Commit Graph

8 Commits

Author SHA1 Message Date
Ana María Martínez Gómez
6d00ae26ae hooks: do not repeat #!/usr/bin/env bash
The comment claims that:
> doesn't matter if `#!/usr/bin/env bash` gets repeated later on in a hooks file

However it is a convetion that there is only one comment like that and
the `setup-hooks.sh` script already takes care of adding it if the file
didn't exist.

Alternatively, we could leave the extra comment and remove the related
code in `setup-hooks.sh`. Currently two comments are added even if the
file didn't exist.
2020-07-29 20:16:56 +02:00
Ana María Martínez Gómez
22fd52ccb9 hooks: do not render git stash output
The `-q` options hides most of the output, but not everything.
2020-07-29 20:16:55 +02:00
Ana María Martínez Gómez
70dda980e8 hooks: update style checkers in hooks
Run `isort` and `black` in the hooks. Run them with the `--check` option
to not modify files which could be committed by accident.

Note that the changes in `.gitignore` are not needed as `.log` is
already excluded in the Django's section. We add those file to this
section in case `.log` is removed in the future.
2020-07-29 20:16:52 +02:00
William Ballenthin
baeea5b6ec *: update license header to reference Apache 2.0
closes #173
2020-07-22 15:05:24 -06:00
William Ballenthin
3faf175da7 *: add license header
closes #144
2020-07-15 14:14:53 -06:00
William Ballenthin
56b9462d01 git hooks: fix references to tox config 2020-07-07 12:30:54 -06:00
William Ballenthin
918a47cfb7 git hooks: address shellcheck issues 2020-06-26 19:04:36 -06:00
Ana María Martínez Gómez
96ad823e35 Add hooks for running linters and tests
Add the `scripts/setup-hooks.sh` script which sets the following hooks
up:
- The `post-commit` hook runs the linter after every `git commit`,
  letting you know if there are code style or rule linter offenses you
  need to fix.
- The `pre-push` hook runs the linter and the tests and block the `git
  push` if they do not succeed.
  This way you realise if everything is alright without the need of
  sending a PR.
2020-06-22 11:35:45 +02:00