Commit Graph

10 Commits

Author SHA1 Message Date
Moritz Raabe
8de69c639a s/fireeye/mandiant 2021-09-29 12:55:16 +02:00
Ana María Martínez Gómez
f9abbbe9ba hooks: change from post- to pre-commit
Avoid erroneous commits. The pre-commit can be skipped with the
`--no-verify` option, which is not available with the post-commit.
Note that `pre-commit` doesn't run when rebase while post-commit did.

This allows to have a single script which is run by both hooks. This
scripts can also be used independently to run the CI setup locally.
2020-07-29 20:25:03 +02:00
Ana María Martínez Gómez
8ff9e339f5 hooks: improve comment in setup-hooks.sh
Previously the `setup-hooks.sh` took care of more things. Consequently
the comments needed to be separated. This is not needed anymore and it
looks weird.
2020-07-29 20:16:58 +02:00
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
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
918a47cfb7 git hooks: address shellcheck issues 2020-06-26 19:04:36 -06:00
William Ballenthin
d1dd997b7b setup: add dev dependencies
closes #21
2020-06-26 18:59:23 -06:00
Moritz
95b3b129ec Update setup-hooks.sh 2020-06-24 14:29:50 +02: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