rspec/rules/S120/java/rule.adoc
2023-10-17 10:34:22 +02:00

51 lines
762 B
Plaintext

== Why is this an issue?
include::../description.adoc[]
== How to fix it
Rename packages with the expected naming convention
=== Code examples
==== Noncompliant code example
With the default regular expression ``++^[a-z_]+(\.[a-z_][a-z0-9_]*)*$++``:
[source,java,diff-id=1,diff-type=noncompliant]
----
package org.exAmple; // Noncompliant
----
==== Compliant solution
[source,java,diff-id=1,diff-type=compliant]
----
package org.example;
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
=== Parameters
.format
****
----
^[a-z_]+(\.[a-z_][a-z0-9_]*)*$
----
Regular expression used to check the package names against.
****
'''
endif::env-github,rspecator-view[]