rspec/rules/S100/java/rule.adoc
2020-12-21 15:38:52 +01:00

25 lines
448 B
Plaintext

Shared naming conventions allow teams to collaborate efficiently. This rule checks that all method names match a provided regular expression.
== Noncompliant Code Example
With default provided regular expression `+^[a-z][a-zA-Z0-9]*$+`:
----
public int DoSomething(){...}
----
== Compliant Solution
----
public int doSomething(){...}
----
== Exceptions
Overriding methods are excluded.
----
@Override
public int Do_Something(){...}
----