diff --git a/net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checkstyle-metadata.properties b/net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checkstyle-metadata.properties index a0db82d63..8b1e322e4 100644 --- a/net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checkstyle-metadata.properties +++ b/net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checkstyle-metadata.properties @@ -1 +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.charset = name of the file charset (Note: eclipse-cs plugin sets this property to the projects default charset) +Checker.fileExtensions = file extensions that are accepted (comma separated) +Checker.haltOnException = Controls whether exceptions should halt execution or not. +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 +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 diff --git a/net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checkstyle-metadata.xml b/net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checkstyle-metadata.xml index 6e074f660..254a9638c 100644 --- a/net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checkstyle-metadata.xml +++ b/net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checkstyle-metadata.xml @@ -4,5 +4,43 @@ "http://eclipse-cs.sourceforge.net/dtds/checkstyle-metadata_1_1.dtd"> + + + + %Checker.desc + + %Checker.cacheFile + + + %Checker.basedir + + + %Checker.localeCountry + + + %Checker.localeLanguage + + + %Checker.charset + + + %Checker.fileExtensions + + + %Checker.haltOnException + + + %Checker.tabWidth + + + + + + %TreeWalker.desc + + %TreeWalker.fileExtensions + + diff --git a/net.sf.eclipsecs.checkstyle/test/net/sf/eclipsecs/checkstyle/ChecksTest.java b/net.sf.eclipsecs.checkstyle/test/net/sf/eclipsecs/checkstyle/ChecksTest.java index b47ce2649..033fc82db 100644 --- a/net.sf.eclipsecs.checkstyle/test/net/sf/eclipsecs/checkstyle/ChecksTest.java +++ b/net.sf.eclipsecs.checkstyle/test/net/sf/eclipsecs/checkstyle/ChecksTest.java @@ -21,10 +21,19 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import com.puppycrawl.tools.checkstyle.Checker; +import com.puppycrawl.tools.checkstyle.TreeWalker; + public class ChecksTest { + @Test public void testMetadataFiles() throws Exception { final Set> modules = CheckUtil.getCheckstyleModules(); + + // don't test root modules + modules.remove(Checker.class); + modules.remove(TreeWalker.class); + final Set packages = CheckUtil.getPackages(modules); assertTrue(modules.size() > 0, "no modules");