Update RSPEC

This commit is contained in:
yassin-kammoun-sonarsource 2025-03-25 13:36:48 +01:00
parent 7bac0febbf
commit d23e6f1e6f
2 changed files with 25 additions and 30 deletions

View File

@ -1,2 +1,7 @@
{
}
"tags": [
"confusing",
"bad-practice",
"clippy"
]
}

View File

@ -1,44 +1,34 @@
FIXME: add a description
// If you want to factorize the description uncomment the following line and create the file.
//include::../description.adoc[]
== Why is this an issue?
FIXME: remove the unused optional headers (that are commented out)
include::../description.adoc[]
//=== What is the potential impact?
== How to fix it
//== How to fix it in FRAMEWORK NAME
=== Code examples
==== Noncompliant code example
=== Noncompliant code example
[source,rust,diff-id=1,diff-type=noncompliant]
----
FIXME
let mut x = 0;
loop {
x += 1;
if x == 1 {
return;
}
break;
}
----
==== Compliant solution
=== Compliant solution
[source,rust,diff-id=1,diff-type=compliant]
----
FIXME
let mut x = 0;
x += 1;
if x == 1 {
return;
}
----
//=== How does this work?
== Resources
//=== Pitfalls
=== Documentation
//=== Going the extra mile
//== Resources
//=== Documentation
//=== Articles & blog posts
//=== Conference presentations
//=== Standards
//=== External coding guidelines
//=== Benchmarks
* Clippy Lints - https://rust-lang.github.io/rust-clippy/master/index.html#never_loop