class PropertiesFileRuleSetConfigurer extends java.lang.Object implements RuleSetConfigurer
Reads the properties file named "codenarc.properties", if found on the classpath, and applies
the property values to matching Rules within a specified RuleSet
. If the
properties file is not found on the classpath, then do nothing.
[rule-name].[property-name]=[property-value]
,
the named property for the rule within the RuleSet matching rule-name is set to the
specified property-value. Properties entries not of this form or specifying rule
names not within the specified RuleSet are ignored. Modifiers | Name | Description |
---|---|---|
protected java.lang.String |
defaultPropertiesFilename |
Constructor and description |
---|
PropertiesFileRuleSetConfigurer() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Configure the rules within the RuleSet from the properties file (relative to the classpath). The default properties filename is "codenarc.properties", but can be overridden by setting the "codenarc.properties.filename" system property.
Each properties entry of the form [rule-name].[property-name]=[property-value]
is used to set the named property of the named rule. Other (non-matching)
property entries are ignored.
ruleSet
- - the RuleSet to configure; must not be nullpropertiesFilename
- - optional filename of properties file; may be ay be optionally prefixed
by any of the valid java.net.URL prefixes, such as "file:".