Update RSPEC
This commit is contained in:
parent
7bac0febbf
commit
d23e6f1e6f
@ -1,2 +1,7 @@
|
||||
{
|
||||
"tags": [
|
||||
"confusing",
|
||||
"bad-practice",
|
||||
"clippy"
|
||||
]
|
||||
}
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user