Details
-
Type:
Code Smell Detection
-
Status: Active
-
Resolution: Unresolved
-
Labels:
-
Message:Update this "artifactId" to match the provided regular expression: xxx
-
Highlighting:
-
List of parameters:
- key: regex
- description: The regular expression the "artifactId" should match
- default: [a-z][a-z-0-9]+
-
Default Severity:Minor
-
Impact:Low
-
Likelihood:Low
-
Covered Languages:Java
-
Remediation Function:Constant/Issue
-
Constant Cost:5min
-
Analysis Scope:Main Sources, Test Sources
Description
Shared naming conventions allow teams to collaborate effectively. This rule raises an issue when a pom's artifactId does not match the provided regular expression.
Noncompliant Code Example
With the default regular expression: [a-z][a-z-0-9]+
<project ...> <artifactId>My_Project</artifactId> <!-- Noncompliant --> <!-- ... --> </project>
Compliant Solution
<project ...> <artifactId>my-project</artifactId> <!-- ... --> </project>
Attachments
Issue Links
- is implemented by
-
SONARJAVA-1428 Rule S3420: Artifact ids should follow a naming convention
-
- Closed
-