Package: groovy.org.codenarc.rule.naming

## [Groovy] Class PackageNameRule

- groovy.org.codenarc.rule.naming.PackageNameRule

- Rule that verifies that the package name of a class matches a regular expression. By default it checks that the package name consists of only lowercase letters and numbers, separated by periods.

  The `regex` property specifies the regular expression to check the package name against. It is required and cannot be null or empty. It defaults to '[a-z]+[a-z0-9]*(\.[a-z0-9]+)*'.

  The `packageNameRequired` property indicates whether a package name declaration is required for all classes. It defaults to false.
  Authors:
    Chris Mair
    Hamlet D'Arcy

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `Class` | `astVisitorClass`
    `String` | `name`
    `boolean` | `packageNameRequired`
    `int` | `priority`
    `String` | `regex`

- - ### Property Detail

    - #### Class astVisitorClass

    - #### String name

    - #### boolean packageNameRequired

    - #### int priority

    - #### String regex