macisamuele / language-formatters-pre-commit-hooks

Collection of custom pre-commit hooks.
Apache License 2.0
116 stars 58 forks source link

Add checksum arguments #222

Closed mxr closed 5 months ago

mxr commented 6 months ago

Resolves #216

Added some unit tests and also verified locally. For example using this config:

repos:
- repo: https://github.com/mxr/language-formatters-pre-commit-hooks
  rev: sha
  hooks:
  - id: pretty-format-java
    args: [--google-java-formatter-jar-checksum=1234]

Running the hook fails as expected

Expected '/Users/mxr/.cache/pre-commit/google-java-formatter1.21.0.jar' to have checksum '1234' but got '1e69f8b63c39a5124a8efb7bad213eb9ac03944339eb9580ae210b0c60565d9b'

(When I fixed the SHA it worked)

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (6e59270) to head (2f03d55). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #222 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 10 10 Lines 337 355 +18 ========================================= + Hits 337 355 +18 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mxr commented 5 months ago

Please address the comment and rebase the change. I will be happy to merge this once it is done

sg will do this before Monday

mxr commented 5 months ago

@macisamuele friendly ping :)