
Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
57 lines
911 B
Plaintext
57 lines
911 B
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
Using the regular expression ``++^[_a-z][a-zA-Z0-9]*$++``, the noncompliant code below:
|
|
|
|
[source,flex,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
class MyClass {
|
|
public var my_field:int;
|
|
}
|
|
----
|
|
|
|
Should be replaced with:
|
|
|
|
[source,flex,diff-id=1,diff-type=compliant]
|
|
----
|
|
public class MyClass {
|
|
public var myField:int;
|
|
}
|
|
----
|
|
|
|
== Resources
|
|
|
|
=== Documentation
|
|
|
|
* Wikipedia - https://en.wikipedia.org/wiki/Naming_convention_(programming)[Naming Convention (programming)]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
=== Parameters
|
|
|
|
.format
|
|
****
|
|
|
|
----
|
|
^[_a-z][a-zA-Z0-9]*$
|
|
----
|
|
|
|
Regular expression used to check the field names against.
|
|
****
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|