diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..21a70fb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.4.0 # Use the ref you want to point at + hooks: + - id: trailing-whitespace +- repo: local + hooks: + - id: go-checks + name: Go checks + entry: ./scripts/go-checks.sh + types: [file, go] + pass_filenames: true + language: system + description: Run gofmt and lint on files included in the commit. + diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..ceafd84 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,7 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [2, 'always', ['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test', 'example']], + }, + defaultIgnores: false, +}