Skip to content

Commit

Permalink
Add bin/lint utility
Browse files Browse the repository at this point in the history
Add a utility per @fang19911030 request to apply `black` with the same
settings that the GitHub action uses.
  • Loading branch information
TimothyWillard committed Nov 1, 2024
1 parent 8e67ca8 commit 71ee9b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bin/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

black --line-length 92 \
--extend-exclude 'flepimop/gempyor_pkg/src/gempyor/steps_rk4.py' \
--verbose .
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ black --line-length 92 \
--verbose .
```

For those using a Mac or Linux system for development you can take advantage of the formatting pre-commit hook found at `bin/pre-commit`. To start using it copy this file to your git hooks folder:
For those using a Mac or Linux system for development this command is also available for use by calling `./dev/lint`. Similarly, you can take advantage of the formatting pre-commit hook found at `bin/pre-commit`. To start using it copy this file to your git hooks folder:

```bash
cp -f bin/pre-commit .git/hooks/
Expand Down

0 comments on commit 71ee9b1

Please sign in to comment.