Skip to content

xbcsmith/x-commit-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x-commit-hooks

x commit hooks

pre-commit hooks for current projects.

warning some of these scripts are set to fix code.

prereq

installed

  • python 3.11+
  • go 1.21+
  • nodejs 16.+

python

pip install --user pre-commit
pip install --user yamllint
pip install --user black flake8 isort

go

curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2

npm

npm install --save --save-exact @commitlint/cli @commitlint/config-conventional
npm install --save --save-exact remark-cli remark-preset-lint-recommended
npm install --save --save-exact markdownlint-cli
npm install --save --save-exact prettier

commitlint config

echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js

shellcheck https://github.com/koalaman/shellcheck

hadolint https://github.com/hadolint/hadolint

usage

generic

./scripts/x-generic-hooks.sh

go

./scripts/x-go-hooks.sh

python

./scripts/x-python-hooks.sh

install

./scripts/update.sh

examples

To use an example pre-commit config copy the best fit into the root of your project as .pre-commit-config.yaml and edit as needed.

docker image

build:

docker build -t x-commit-hooks:local .

usage:

docker run -it -v $(pwd):/src:rw,z x-commit-hooks:local x-generic-hooks.sh

tools

useful

About

Commit Hooks for Projects

Resources

Stars

Watchers

Forks

Packages

No packages published