Skip to content

Commit 2857d03

Browse files
committed
partial revert of 47e3343 to add root modules back
1 parent 937168a commit 2857d03

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
11
Other.group = Other
2+
3+
Checker.name = Checker
4+
Checker.desc = Root module of every checkstyle configuration. Cannot be deleted.
5+
Checker.cacheFile = caches information about files that have checked ok; used to avoid repeated checks of the same files
6+
Checker.basedir = base directory name; stripped off in messages about files
7+
Checker.localeCountry = locale country for messages
8+
Checker.localeLanguage = locale language for messages
9+
Checker.charset = name of the file charset (Note: eclipse-cs plugin sets this property to the projects default charset)
10+
Checker.fileExtensions = file extensions that are accepted (comma separated)
11+
Checker.haltOnException = Controls whether exceptions should halt execution or not.
12+
Checker.tabWidth = number of expanded spaces for a tab character ('\t'); used in messages and Checks that print violations on files with tabs
13+
14+
TreeWalker.name = TreeWalker
15+
TreeWalker.desc = FileSetCheck TreeWalker checks individual Java source files and defines properties that are applicable to checking such files.
16+
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

net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checkstyle-metadata.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,43 @@
44
"http://eclipse-cs.sourceforge.net/dtds/checkstyle-metadata_1_1.dtd">
55
<checkstyle-metadata>
66
<rule-group-metadata name="%Other.group" priority="1500">
7+
8+
<rule-metadata name="%Checker.name" internal-name="Checker" parent="Root" singleton="true" default-severity="warning">
9+
<alternative-name internal-name="com.puppycrawl.tools.checkstyle.Checker"/>
10+
<description>%Checker.desc</description>
11+
<property-metadata name="cacheFile" datatype="File">
12+
<description>%Checker.cacheFile</description>
13+
</property-metadata>
14+
<property-metadata name="basedir" datatype="String">
15+
<description>%Checker.basedir</description>
16+
</property-metadata>
17+
<property-metadata name="localeCountry" datatype="String">
18+
<description>%Checker.localeCountry</description>
19+
</property-metadata>
20+
<property-metadata name="localeLanguage" datatype="String">
21+
<description>%Checker.localeLanguage</description>
22+
</property-metadata>
23+
<property-metadata name="charset" datatype="String">
24+
<description>%Checker.charset</description>
25+
</property-metadata>
26+
<property-metadata name="fileExtensions" datatype="String">
27+
<description>%Checker.fileExtensions</description>
28+
</property-metadata>
29+
<property-metadata name="haltOnException" datatype="Boolean" default-value="true">
30+
<description>%Checker.haltOnException</description>
31+
</property-metadata>
32+
<property-metadata name="tabWidth" datatype="Integer" default-value="8">
33+
<description>%Checker.tabWidth</description>
34+
</property-metadata>
35+
</rule-metadata>
36+
37+
<rule-metadata name="%TreeWalker.name" internal-name="TreeWalker" parent="Checker"
38+
singleton="true">
39+
<alternative-name internal-name="com.puppycrawl.tools.checkstyle.TreeWalker"/>
40+
<description>%TreeWalker.desc</description>
41+
<property-metadata name="fileExtensions" datatype="String" default-value="java">
42+
<description>%TreeWalker.fileExtensions</description>
43+
</property-metadata>
44+
</rule-metadata>
745
</rule-group-metadata>
846
</checkstyle-metadata>

net.sf.eclipsecs.checkstyle/test/net/sf/eclipsecs/checkstyle/ChecksTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,19 @@
2121
import org.w3c.dom.Node;
2222
import org.w3c.dom.NodeList;
2323

24+
import com.puppycrawl.tools.checkstyle.Checker;
25+
import com.puppycrawl.tools.checkstyle.TreeWalker;
26+
2427
public class ChecksTest {
28+
2529
@Test
2630
public void testMetadataFiles() throws Exception {
2731
final Set<Class<?>> modules = CheckUtil.getCheckstyleModules();
32+
33+
// don't test root modules
34+
modules.remove(Checker.class);
35+
modules.remove(TreeWalker.class);
36+
2837
final Set<String> packages = CheckUtil.getPackages(modules);
2938

3039
assertTrue(modules.size() > 0, "no modules");

0 commit comments

Comments
 (0)