#98 case in package names

release_2.4
closed
Lars Kühne
None
5
2012-10-10
2002-08-20
Simon Langford
No

similar to the patterns for parameters and types, add a
pattern for package names, with a default for all lower
case. eg:

checkstyle.pattern.packagename=^a-z*$

Discussion

  • Lars Kühne
    Lars Kühne
    2002-09-03

    Logged In: YES
    user_id=401384

    I've started working on this, it's basically working in my
    local sandbox, but no tests and no docs yet.

    Uppercase letters seem rather uncommon, but they're allowed in
    http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#40169
    and I can't find any statement in the Sun Coding Conventions
    or in the JLS that they should not be used (except from top
    level domain name like com, edu, etc).

    Since we claim to support the Sun Conventions by default, I
    think that ^[a-z]+(\.[a-zA-Z_][a-zA-Z_0-9])$ is the
    correct value here, but of course it will be possible to
    check for all lowercase.

     
  • Simon Langford
    Simon Langford
    2002-09-04

    Logged In: YES
    user_id=549015

    I've already submitted a patch to do this.

     
  • Lars Kühne
    Lars Kühne
    2002-09-08

    Logged In: YES
    user_id=401384

    The feature is now implemented in CVS and will be available
    in the next release.