Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 946 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 946 Bytes

pre-commit-checkstyle

A docker based pre-commit hook for Java checkstyle

This hook will create a folder named .pre-commit in you working directory, where the used checkstyle jar file will be located. Changing the first argument of the hook allows to select a different version. Make sure to add the cache folder to you gitignore file:

.pre-commit

Using this hook

- repo: https://github.com/HotSprings-GmbH/pre-commit-checkstyle
  rev: "" # A Tag or commit hash
  hooks:
    - id: checkstyle
      args:
        - "8.41" # the checkstyle version
        - "-c=checkstyle.xml" # configure checkstyle
      stages:
        - commit

Dependencies

Checkstyle

This hook uses the latest provided version of checkstyle.