| Module-Checkstyle documentation | view source | Contained in the Module-Checkstyle distribution. |
Module::Checkstyle::Check::Package - Handles 'package' declarations
Checks that your package is named correctly. Use matches-name to declare a regular expression that must match.
matches-name = /^\w+(\:\:\w+)*$/
Checks that you only declare a specified number of packages in a
single source file. Use max-per-file to set the maximum
number of package-statements allowed. You usually want this to be
set to 1.
max-per-file = 1
Checks that the the first significantstatement in a file is a package-declaration.
Enable by setting package-comes-first to true. This
test is only enabled if the parsed file ends with .pm
is-first-statement = true
Checks that at least one package in the given file matches the name of the file. That is if the file is named lib/Module/Checkstyle.pm it must declare Module::Checkstyle as a package in the file. Enable by setting has-matching-filename to true.
has-matching-filename = true
Writing configuration files. Format in Module::Checkstyle::Config
| Module-Checkstyle documentation | view source | Contained in the Module-Checkstyle distribution. |