Skip to content

Java linter defaults to sun style checks #636

Description

@yuriylesyuk

This ruleset is highly restrictive and insists on 80 columns line limit, which is counter-productive.

- Using [checkstyle v9.0.1] https://checkstyle.sourceforge.io
9113- Mega-Linter key: [JAVA_CHECKSTYLE]
9114- Rules config: [sun_checks.xml]

we need to switch to the google style set.

as a further incremental improvement, we can configure a google rule set from a google repository.

https://github.com/googleapis/google-api-java-client/blob/main/checkstyle.xml

We also would need to discuss and finetune specific rules.
Two I've encountered with not helpful defaults:

Error: /github/workspace/references/hashicorp-vault-integration/vault-facade-callout/src/main/java/com/exco/vaultkeystojwks/VaultKeysToJwks.java:77:3: Comment matches to-do format 'TODO:'. [TodoComment]

https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.html

we are going to hit more in the future, thus it is better to be ready for it and have a process in place.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions