Package and class declaration versus the directory and file names
Richard Walker <[email protected]> Wed, 4 Aug 2010 10:47:46 +1000
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
I would like to do the following checks: 1. Check that the package declaration matches the directory path, e.g. "package a.b.c;" means the source file must be in directory a/b/c. 2. Check that the first class defined in a file has a name that matches the filename, e.g. "class MyClass" must be defined in MyClass.java. I didn't find these checks among the Checkstyle built-ins. Did I miss them? Or, has anyone else implemented them? ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm