https://github.com/trussworks/pre-commit-hooks
Common pre-commit hooks
https://github.com/trussworks/pre-commit-hooks
adr-log circleci goreleaser markdown-toc mdspell pre-commit
Last synced: about 1 month ago
JSON representation
Common pre-commit hooks
- Host: GitHub
- URL: https://github.com/trussworks/pre-commit-hooks
- Owner: trussworks
- License: bsd-3-clause
- Created: 2019-11-06T23:45:52.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-14T10:59:23.000Z (8 months ago)
- Last Synced: 2024-10-31T13:23:50.582Z (7 months ago)
- Topics: adr-log, circleci, goreleaser, markdown-toc, mdspell, pre-commit
- Language: Shell
- Homepage: https://github.com/trussworks/pre-commit-hooks
- Size: 29.3 KB
- Stars: 6
- Watchers: 9
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Truss pre-commit hooks
- [Truss pre-commit hooks](#truss-pre-commit-hooks)
- [circleci-validate](#circleci-validate)
- [gen-docs](#gen-docs)
- [goreleaser-check](#goreleaser-check)
- [markdown-toc](#markdown-toc)
- [mdspell](#mdspell)
- [spelling-sort](#spelling-sort)
- [hadolint](#hadolint)## circleci-validate
Validate CircleCI config yaml located in `.circleci/config.yml`. In order for this to run you will need to install
the `circleci` CLI tool locally with:```sh
brew install circleci
```The script will not run the validation if the environment variable `CI` is set, which means you can safely run this
on CircleCI and it will be a no-op.## gen-docs
Generate a Docs Index using [adr-log](https://www.npmjs.com/package/adr-log). It will modify files with comments in it
per the docs on that module.By default it will only look in the `docs/` directory of your repo. You can pass in different directories by using
the `args` parameter like this: `args: ["docs/adr", "docs/rfc"]`## goreleaser-check
Validate goreleaser config yaml located at `.goreleaser.yml`. In order for this to run you will need to install
the `goreleaser` CLI tool locally with:```sh
brew install goreleaser
```## markdown-toc
Generate a Table of Contents using [markdown-toc](https://www.npmjs.com/package/markdown-toc). It will modify files
with comments in it per the docs on that module.## mdspell
Run spellcheck on markdown files using [markdown-spellcheck](https://www.npmjs.com/package/markdown-spellcheck). It
will ignore words listed in a `.spelling` file in your repo.## spelling-sort
Run `sort` on the `.spelling` file used by the `markdown-spellcheck` tool. This keeps the file tidy as it is used.
## hadolint
Run the [hadolint](https://github.com/hadolint/hadolint) Dockerfile linter