2020-06-30 10:16:44 +02:00
|
|
|
Shared naming conventions allow teams to collaborate efficiently. This rule checks that all method names match a provided regular expression.
|
|
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
|
2021-01-27 13:42:22 +01:00
|
|
|
With default provided regular expression ``++^[a-z][a-zA-Z0-9]*$++``:
|
2020-06-30 14:49:38 +02:00
|
|
|
|
2020-06-30 10:16:44 +02:00
|
|
|
----
|
|
|
|
public int DoSomething(){...}
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
|
|
|
----
|
|
|
|
public int doSomething(){...}
|
|
|
|
----
|
|
|
|
|
|
|
|
== Exceptions
|
|
|
|
|
|
|
|
Overriding methods are excluded.
|
2020-06-30 14:49:38 +02:00
|
|
|
|
2020-06-30 10:16:44 +02:00
|
|
|
----
|
|
|
|
@Override
|
|
|
|
public int Do_Something(){...}
|
|
|
|
----
|