48 lines
739 B
Plaintext
48 lines
739 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
With the default regular expression ``++^[a-z][a-zA-Z0-9]*$++``:
|
|
|
|
----
|
|
public void doSomething(int my_param) {
|
|
int LOCAL;
|
|
...
|
|
}
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
public void doSomething(int myParam) {
|
|
int local;
|
|
...
|
|
}
|
|
----
|
|
|
|
== Exceptions
|
|
|
|
Loop counters are ignored by this rule.
|
|
|
|
----
|
|
for (int i_1 = 0; i_1 < limit; i_1++) { // Compliant
|
|
// ...
|
|
}
|
|
----
|
|
as well as one-character ``++catch++`` variables:
|
|
|
|
----
|
|
try {
|
|
//...
|
|
} catch (Exception e) { // Compliant
|
|
}
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|