Skip to content

Commit

Permalink
Issue checkstyle#451: fix checkstyle violations
Browse files Browse the repository at this point in the history
  • Loading branch information
Calixte committed Jan 31, 2023
1 parent b860784 commit 4290fbb
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 132 deletions.
4 changes: 1 addition & 3 deletions config/checkstyle_checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@

<!-- Miscellaneous -->
<module name="NewlineAtEndOfFile"/>
<module name="Translation">
<property name="requiredTranslations" value="de, es, fi, fr, ja, pt, ru, tr, zh"/>
</module>
<module name="Translation"/>
<module name="UniqueProperties"/>
<module name="OrderedProperties" />

Expand Down
2 changes: 1 addition & 1 deletion net.sf.eclipsecs.branding/about.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ This software includes the following 3rd-party libraries:\n\
Checkstyle, licensed under LGPL 2.1. Visit https://checkstyle.org/\n\
Jakarta Commons Lang/IO, licensed under APL 2.0. Visit http://commons.apache.org/\n\
DOM4J, licensed under BSD. Visit http://sourceforge.net/projects/dom4j/\n\
JFreeChart, licensed under LGPL 3. Visit http://www.jfree.org/jfreechart/
JFreeChart, licensed under LGPL 3. Visit http://www.jfree.org/jfreechart/
2 changes: 1 addition & 1 deletion net.sf.eclipsecs.branding/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
<artifactId>net.sf.eclipsecs.branding</artifactId>
<packaging>eclipse-plugin</packaging>
<name>eclipse-cs Branding Plugin</name>
</project>
</project>
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Other.group = Other

Checker.name = Checker
Checker.desc = Root module of every checkstyle configuration. Cannot be deleted.
Checker.cacheFile = caches information about files that have checked ok; used to avoid repeated checks of the same files
Checker.basedir = base directory name; stripped off in messages about files
Checker.localeCountry = locale country for messages
Checker.localeLanguage = locale language for messages
Checker.cacheFile = caches information about files that have checked ok; used to avoid repeated checks of the same files
Checker.charset = name of the file charset (Note: eclipse-cs plugin sets this property to the projects default charset)
Checker.desc = Root module of every checkstyle configuration. Cannot be deleted.
Checker.fileExtensions = file extensions that are accepted (comma separated)
Checker.haltOnException = Controls whether exceptions should halt execution or not.
Checker.localeCountry = locale country for messages
Checker.localeLanguage = locale language for messages
Checker.name = Checker
Checker.tabWidth = number of expanded spaces for a tab character ('\t'); used in messages and Checks that print violations on files with tabs

TreeWalker.name = TreeWalker
Other.group = Other

TreeWalker.desc = FileSetCheck TreeWalker checks individual Java source files and defines properties that are applicable to checking such files.
TreeWalker.fileExtensions = file type extension to identify java files. Setting this property is typically only required if your java source code is preprocessed before compilation and the original files do not have the extension .java
TreeWalker.name = TreeWalker
4 changes: 1 addition & 3 deletions net.sf.eclipsecs.doc/build.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
generateSourceBundle=false
bin.includes = META-INF/,\
docs/,\
toc.xml,\
plugin.xml


generateSourceBundle=false
200 changes: 100 additions & 100 deletions net.sf.eclipsecs.doc/src/main/resources/dtds/checkstyle-metadata_1_0.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -8,138 +8,138 @@
-->

<!--
Root element for every metadata definition.
-->
Root element for every metadata definition.
-->
<!ELEMENT checkstyle-metadata (rule-group-metadata+)>


<!--
Used to specify a group of rules.
The 'name' attribute is used as display name and is translatable.
The 'priority' influences the order in which groups appear in the configuration editor.
The 'hidden' attribut can be used to hide an entire group.
-->
Used to specify a group of rules.
The 'name' attribute is used as display name and is translatable.
The 'priority' influences the order in which groups appear in the configuration editor.
The 'hidden' attribut can be used to hide an entire group.
-->
<!ELEMENT rule-group-metadata (description?,rule-metadata*)>
<!ATTLIST rule-group-metadata
name CDATA #REQUIRED
priority CDATA #REQUIRED
hidden (true|false) "false">
name CDATA #REQUIRED
priority CDATA #REQUIRED
hidden (true|false) "false">

<!--
Used to to provide a textual description for the element.
The content might be translatable.
-->
Used to to provide a textual description for the element.
The content might be translatable.
-->
<!ELEMENT description (#PCDATA)>


<!--
'rule-metadata' elements are used to define the metadata for a check (or filter) module.
The 'name' attribute is used as display name and is translatable.
The 'internal-name' attribute defines the logical name of the module.
The 'parent' element defines if the module is a file set check (Checker as parent)
or a regular 'TreeWalker' check.
The 'hasSeverity' attribute specifies if a module has a severity property that can be set.
Some modules (like filters) have no severity property.
The 'hidden' attribute is used to hide a module, so it cannot be seen or
configured in the configuration editor. This is only used for some special modules
like FileContentsHolder. The attribut defaults to 'false'.
The 'deletable' attribute is used to specify if the module can be removed from the
configuration via the configuration editor. This only makes sense for some
special modules like Checker or TreeWalker, which must be present. Therefore
this attribute default to 'false'.
The 'singleton' module is used to specify if the module should occur only once in
a checkstyle configuration. This will be taken into account by the configuration editor.
-->
'rule-metadata' elements are used to define the metadata for a check (or filter) module.
The 'name' attribute is used as display name and is translatable.
The 'internal-name' attribute defines the logical name of the module.
The 'parent' element defines if the module is a file set check (Checker as parent)
or a regular 'TreeWalker' check.
The 'hasSeverity' attribute specifies if a module has a severity property that can be set.
Some modules (like filters) have no severity property.
The 'hidden' attribute is used to hide a module, so it cannot be seen or
configured in the configuration editor. This is only used for some special modules
like FileContentsHolder. The attribut defaults to 'false'.
The 'deletable' attribute is used to specify if the module can be removed from the
configuration via the configuration editor. This only makes sense for some
special modules like Checker or TreeWalker, which must be present. Therefore
this attribute default to 'false'.
The 'singleton' module is used to specify if the module should occur only once in
a checkstyle configuration. This will be taken into account by the configuration editor.
-->
<!ELEMENT rule-metadata (alternative-name+,description?,property-metadata*,quickfix*)>
<!ATTLIST rule-metadata
name CDATA #REQUIRED
internal-name NMTOKEN #REQUIRED
parent NMTOKEN #REQUIRED
hasSeverity (true|false) "true"
hidden (true|false) "false"
deletable (true|false) "true"
singleton (true|false) "false">
name CDATA #REQUIRED
internal-name NMTOKEN #REQUIRED
parent NMTOKEN #REQUIRED
hasSeverity (true|false) "true"
hidden (true|false) "false"
deletable (true|false) "true"
singleton (true|false) "false">


<!--
Every 'rule-metadata' element must have at least one 'alternative-name' child
element, which describes under which name the module might occur in a configuration
file as well. As you may know you can specify modules in a Checkstyle configuration
file using the logical module name or the fully qualified class name.
This means that this element is used to map the fully qualified module class name
to this module.
You are able to provide multiple alternative names, which might be useful if
your package structure for your modules changed over time. In this case specify
the old qualified class names for your module as 'alternative-name' element.
The plugin is then able to load even Checkstyle configuration files where your old
module names are used.
-->
Every 'rule-metadata' element must have at least one 'alternative-name' child
element, which describes under which name the module might occur in a configuration
file as well. As you may know you can specify modules in a Checkstyle configuration
file using the logical module name or the fully qualified class name.
This means that this element is used to map the fully qualified module class name
to this module.
You are able to provide multiple alternative names, which might be useful if
your package structure for your modules changed over time. In this case specify
the old qualified class names for your module as 'alternative-name' element.
The plugin is then able to load even Checkstyle configuration files where your old
module names are used.
-->
<!ELEMENT alternative-name EMPTY>
<!ATTLIST alternative-name
internal-name CDATA #REQUIRED>
internal-name CDATA #REQUIRED>


<!--
'property-metadata' elements are used to describe the properties of a checkstyle
module. Properties described this way can then be configured using the plugins
configuration editor.
The 'name' attributes specifies the name of the property.
The 'datatype' attribute determines which kind of data the property contains.
The 'default-value' attribute is used to specify the default value of the property.
The 'override-default-value' attribute can be used to specify a default value that
differs from the Checkstyle default. For instance this is used to provide different
defaults for the logLoadError and suppressLoadError properties of the AbstractTypeAware checks.
Properties of data type 'MultiCheck' and 'SingleSelect' can (better must) be provided
with an 'enumeration' child element which specifies the valid enumeration values for
this property.
-->
<!ELEMENT property-metadata (description?,enumeration?)>
'property-metadata' elements are used to describe the properties of a checkstyle
module. Properties described this way can then be configured using the plugins
configuration editor.
The 'name' attributes specifies the name of the property.
The 'datatype' attribute determines which kind of data the property contains.
The 'default-value' attribute is used to specify the default value of the property.
The 'override-default-value' attribute can be used to specify a default value that
differs from the Checkstyle default. For instance this is used to provide different
defaults for the logLoadError and suppressLoadError properties of the AbstractTypeAware checks.
Properties of data type 'MultiCheck' and 'SingleSelect' can (better must) be provided
with an 'enumeration' child element which specifies the valid enumeration values for
this property.
-->
<!ELEMENT property-metadata (description?,enumeration?)>
<!ATTLIST property-metadata
name NMTOKEN #REQUIRED
datatype (Boolean|Integer|String|Regex|SingleSelect|MultiCheck|File|Hidden) #REQUIRED
default-value CDATA #IMPLIED
override-default-value CDATA #IMPLIED>
name NMTOKEN #REQUIRED
datatype (Boolean|Integer|String|Regex|SingleSelect|MultiCheck|File|Hidden) #REQUIRED
default-value CDATA #IMPLIED
override-default-value CDATA #IMPLIED>


<!--
The 'enumeration' element is used to provide valid enumeration values for 'MultiCheck'
and 'SingleSelect' properties.
Either the enumeration values are defined using 'property-value-option' child elements
or by an option provider.
An option provider is a java class that implements the interface
'net.sf.eclipsecs.config.meta.IOptionProvider' and provides the
enumeration values via implementation. This can be useful for providing large amounts
of enumeration values (for instance all checkstyle tokens) or reoccurring sequences of
enumeration values (for instance the java visibility values).
The option provider and 'property-value-option' elements can be mixed together to build
a single enumeration.
-->
The 'enumeration' element is used to provide valid enumeration values for 'MultiCheck'
and 'SingleSelect' properties.
Either the enumeration values are defined using 'property-value-option' child elements
or by an option provider.
An option provider is a java class that implements the interface
'net.sf.eclipsecs.config.meta.IOptionProvider' and provides the
enumeration values via implementation. This can be useful for providing large amounts
of enumeration values (for instance all checkstyle tokens) or reoccurring sequences of
enumeration values (for instance the java visibility values).
The option provider and 'property-value-option' elements can be mixed together to build
a single enumeration.
-->
<!ELEMENT enumeration (property-value-option*)>
<!ATTLIST enumeration
option-provider NMTOKEN #IMPLIED>
option-provider NMTOKEN #IMPLIED>


<!--
Specifies a single enumeration value.
-->
Specifies a single enumeration value.
-->
<!ELEMENT property-value-option EMPTY>
<!ATTLIST property-value-option
value CDATA #REQUIRED>
value CDATA #REQUIRED>
<!--
Defines a marker resolution (quickfix) for the module.
Quickfixes are required to implement the
Expand All @@ -148,4 +148,4 @@
-->
<!ELEMENT quickfix EMPTY>
<!ATTLIST quickfix
classname NMTOKEN #REQUIRED>
classname NMTOKEN #REQUIRED>
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@
the old qualified class names for your module as 'alternative-name' element.
The plugin is then able to load even Checkstyle configuration files where your old
module names are used.
-->
-->
<!ELEMENT alternative-name EMPTY>
<!ATTLIST alternative-name
internal-name CDATA #REQUIRED>
internal-name CDATA #REQUIRED>


<!--
Expand All @@ -107,7 +107,7 @@
with an 'enumeration' child element which specifies the valid enumeration values for
this property.
-->
<!ELEMENT property-metadata (description?,enumeration?)>
<!ELEMENT property-metadata (description?,enumeration?)>
<!ATTLIST property-metadata
name NMTOKEN #REQUIRED
datatype (Boolean|Integer|String|Regex|SingleSelect|MultiCheck|File|Hidden) #REQUIRED
Expand All @@ -116,18 +116,18 @@


<!--
The 'enumeration' element is used to provide valid enumeration values for 'MultiCheck'
and 'SingleSelect' properties.
Either the enumeration values are defined using 'property-value-option' child elements
or by an option provider.
An option provider is a java class that implements the interface
'net.sf.eclipsecs.config.meta.IOptionProvider' and provides the
enumeration values via implementation. This can be useful for providing large amounts
of enumeration values (for instance all checkstyle tokens) or reoccurring sequences of
enumeration values (for instance the java visibility values).
The option provider and 'property-value-option' elements can be mixed together to build
a single enumeration.
-->
The 'enumeration' element is used to provide valid enumeration values for 'MultiCheck'
and 'SingleSelect' properties.
Either the enumeration values are defined using 'property-value-option' child elements
or by an option provider.
An option provider is a java class that implements the interface
'net.sf.eclipsecs.config.meta.IOptionProvider' and provides the
enumeration values via implementation. This can be useful for providing large amounts
of enumeration values (for instance all checkstyle tokens) or reoccurring sequences of
enumeration values (for instance the java visibility values).
The option provider and 'property-value-option' elements can be mixed together to build
a single enumeration.
-->
<!ELEMENT enumeration (property-value-option*)>
<!ATTLIST enumeration
option-provider NMTOKEN #IMPLIED>
Expand Down Expand Up @@ -155,4 +155,4 @@
-->
<!ELEMENT message-key EMPTY>
<!ATTLIST message-key
key NMTOKEN #REQUIRED>
key NMTOKEN #REQUIRED>

0 comments on commit 4290fbb

Please sign in to comment.