Browse Source

Add a test for empty file list in git hook suggestion (#26)

As it was, the proposed git hook will fail if no Julia file has been
edited in the commit (for example if we only edited Project.toml).
pull/30/head
Hugo LEVY-FALK 1 year ago committed by GitHub
parent
commit
53260886fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      README.md

3
README.md

@ -213,7 +213,10 @@ exec 1>&2 @@ -213,7 +213,10 @@ exec 1>&2
# Run Runic on added and modified files
mapfile -t files < <(git diff-index --name-only --diff-filter=AM master | grep '\.jl$')
if [ ${#files[@]} -gt 0 ]; then
julia --project=@runic -m Runic --check --diff "${files[@]}"
fi
```
## Formatting specification

Loading…
Cancel
Save