Skip to content

Set up GH Linting action for dataone-indexer #159

@artntek

Description

@artntek

User Story

As a PR reviewer, I want to be more efficient by focusing on architecture, code logic and finding potential bugs, instead of flagging issues with syntax, coding style, deprecations, typos etc. that could easily be picked up by an automatic linting tool.

Acceptance Criteria

  • Rules must be configurable
  • Feedback automatically added as PR review comments
  • Checks against the Google Java Style Guide, with the one exception that indents are 4 spaces instead of 2
  • (some of these are negotiable) Includes the level of insight provided by IDEs (e.g. IntelliJ IDEA community edition). Examples include:
    • checks for deprecated code; example:

      deprecated since version 9 and marked for removal: 'Long(java.lang.String)'
      
    • checks for code simplifications. Examples:

      * Field can be converted to a local variable
      * Private field 'spaceAllocated' is assigned but never accessed
      * Method 'hasPermission(java.lang.String, java.lang.String)' is never used
      * 'equals("")' can be replaced with 'isEmpty()'
      
    • Javadoc linting; example: Cannot resolve symbol 'docid,' (i.e. @param in javadoc does not match actual method params)

    • spell-checking in javadoc & comments; example: Typo: In word 'peroperties'

Useful info

Metadata

Metadata

Assignees

No one assigned

    Labels

    _onboardingGood first project for onboardingdevtoolsdev tools, ci/cd etc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions