Groovy Documentation

groovy.org.codenarc.rule.naming
[Groovy] Class PackageNameMatchesFilePathRule

java.lang.Object
  org.codenarc.rule.AbstractRule
      groovy.org.codenarc.rule.naming.PackageNameMatchesFilePathRule

class PackageNameMatchesFilePathRule
extends AbstractRule

A package source file's path should match the package declaration.

To find the package-relevant sub-path in the file path the groupId needs to be configured. It is expected to appear in every package declaration.
Authors:
Simon Tost


Property Summary
String groupId

String name

int priority

 
Method Summary
void applyTo(SourceCode sourceCode, List violations)

boolean isReady()

 

Property Detail

groupId

String groupId


name

String name


priority

int priority


 
Method Detail

applyTo

@Override
void applyTo(SourceCode sourceCode, List violations)


isReady

@Override
boolean isReady()


 

Groovy Documentation