GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [internal] Replacing Checkstyle with Spotless · pmd/pmd · Discussion #7302

[internal] Replacing Checkstyle with Spotless #7302

zbynek started this conversation in General
[internal] Replacing Checkstyle with Spotless #7302
@zbynek zbynek
Nov 8, 2026 · 0 comments
Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

zbynek
Nov 8, 2026
Maintainer

It might make sense to let Spotless take over some of the responsibilities of Checkstyle. Then maybe the remaining rules could be checked by PMD itself. This was discussed in #5875, but that discussion left some questions unanswered.

Can we remove checkstyle? Are there any things that we use in checkstyle and that are not supported by spotless?

The currently used rules are categorized below:

Current Checkstyle rules used by PMD

Not covered by either PMD or Spotless

  • HiddenField
  • PackageAnnotation
  • JavadocPackage
  • BooleanExpressionComplexity
  • AbbreviationAsWordInName
  • TodoComment
  • ArrayTrailingComma (Spotless will add a line break after trailing comma, but not force a comma if there is a line break before })
  • Javadoc parsing
    • MissingDeprecated
    • NonEmptyAtclauseDescription
    • SummaryJavadoc
    • AtclauseOrder
    • JavadocParagraph

Partiallly covered by PMD

  • DeclarationOrder: FieldDeclarationsShouldBeAtStartOfClass
  • MagicNumber: AvoidLiteralsInIfCondition
  • AnnotationUseStyle: UnnecessaryAnnotationValueElement
  • ReturnCount: OnlyOneReturn

Covered by PMD

  • MissingOverride: MissingOverride
  • JavadocMethod: CommentRequired
  • JavadocType: CommentRequired
  • JavadocVariable: CommentRequired
  • AvoidStarImport: OnDemandImport
  • IllegalImport: XPath rule
  • UnusedImports: UnneccessaryImport
  • RedundantImport: UnneccessaryImport
  • MemberName: FieldNamingConventions
  • MethodName: MethodNamingConventions
  • PackageName: PackageCase
  • ParameterName: FormalParameterNamingConventions
  • StaticVariableName: FieldNamingConventions
  • TypeName: TypeNamingConvention
  • ClassTypeParameterName: TypeParameterNamingConventions
  • MethodTypeParameterName: TypeParameterNamingConventions
  • InterfaceTypeParameterName: TypeParameterNamingConventions
  • IllegalCatch: AvoidCatchingGenericException
  • IllegalThrows: AvoidThrowingRawExceptionTypes (not configurable)
  • ParameterAssignment: AvoidReassigningParameters
  • SimplifyBooleanExpression: SimplifyBooleanExpressions + SimplifiedTernary
  • SimplifyBooleanReturn: SimplifyBooleanReturns
  • EmptyBlock: EmptyControlStatement
  • EmptyCatchBlock: EmptyCatchBlock
  • UpperEll: LongLiteralEndingWithLowercaseL
  • OuterTypeFilename: TypeNameMismatch
  • StringLiteralEquality: UseEqualsToCompareStrings
  • ArrayTypeStyle: CStyleArrayDeclaration
  • UnnecessaryParentheses: UselessParentheses
  • OneTopLevelClass: TypeNameMismatch (implied)
  • DefaultComesLast: DefaultLabelNotLastInSwitch
  • PackageDeclaration: NoPackage + TypeNameMismatch
  • FallThrough: ImplicitSwitchFallThrough
  • EqualsHashCode: OverrideBothEqualsAndHashcode
  • ConstantName: FieldNamingConventions
  • LocalVariableName: LocalVariableNamingConventions
  • EmptyStatement: UnnecessarySemicolon
  • RedundantModifier: UnnecessaryModifier
  • NeedBraces: ControlStatementBraces
  • ModifierOrder: ModifierOrder
  • HideUtilityClassConstructor: InstantiableUtilityClass
  • InterfaceIsType: ConstantsInInterface (via ignoreIfHasMethods property)
  • MultipleStringLiterals: AvoidDuplicateLiterals
  • EqualsAvoidNull: LiteralsFirstInComparisons
  • ModifiedControlVariable: AvoidReassigningLoopVariables
  • InnerAssignment: AssignmentInOperand
  • MultipleVariableDeclarations: OneDeclarationPerLine
  • AnnotationLocation: ModifierOrder (via typeAnnotations property)

Covered by Spotless

  • Whitespace
    • JavadocTagContinuationIndentation
    • GenericWhitespace
    • EmptyForInitializerPad
    • EmptyForIteratorPad
    • NoWhitespaceAfter
    • NoWhitespaceBefore
    • OperatorWrap
    • MethodParamPad
    • ParenPad
    • TypecastParenPad
    • WhitespaceAfter
    • WhitespaceAround
    • LeftCurly
    • FileTabCharacter
    • NewlineAtEndOfFile
    • EmptyLineSeparator
    • Indentation
    • SeparatorWrap
    • SingleSpaceSeparator
    • OneStatementPerLine
    • CommentsIndentation
    • RightCurly
  • ImportOrder
  • RegexpHeader

The upside of using Spotless is the possibility to automatically fix the issues it detects.

You must be logged in to vote
All reactions

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💬
General
Labels
None yet
1 participant
@zbynek
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.