rspec/rules/S100/java/rule.adoc

46 lines
795 B
Plaintext

== Why is this an issue?
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]*$++``:
[source,java]
----
public int DoSomething(){...}
----
=== Compliant solution
[source,java]
----
public int doSomething(){...}
----
=== Exceptions
Overriding methods are excluded.
----
@Override
public int Do_Something(){...}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::parameters.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]