rspec/rules/S116/flex/rule.adoc
Angelo Buono febb2d2152
Modify rule S116: Migrate to LayC - Field names should comply with a naming convention (#3266)
Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
2023-10-13 10:06:09 +02:00

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[]