FieldDeclarationsShouldBeAtStart - lpohl-Reply/pmd-github-action GitHub Wiki

Rule: FieldDeclarationsShouldBeAtStart

Message

Field declaration for ''{0}'' should be before method declarations in its class

Description

Field declarations should appear before method declarations within a class.

Priority

3

Example

class Foo {
    public Integer someField; // good

    public void someMethod() {
    }

    public Integer anotherField; // bad
}