ContainerImage.Pinniped/.pre-commit-config.yaml
Matt Moyer 41949d8e07
Add golangci-lint to .pre-commit-config.yaml.
This is the configuration for https://pre-commit.com/, which now also runs golangci-lint using the same version as CI (currently v1.33.0).

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-15 10:20:59 -05:00

30 lines
883 B
YAML

# This is a configuration for https://pre-commit.com/.
# On macOS, try `brew install pre-commit` and then run `pre-commit install`.
exclude: '^(site|generated|hack/lib/tilt/tilt_modules)/'
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
# TODO: find a version of this to validate ytt templates?
# - id: check-yaml
# args: ['--allow-multiple-documents']
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-added-large-files
- id: check-byte-order-marker
- id: detect-private-key
exclude: testdata
- id: mixed-line-ending
- repo: local
hooks:
- id: validate-copyright-year
name: Validate copyright year
entry: hack/check-copyright-year.sh
language: script
- repo: https://github.com/golangci/golangci-lint
rev: v1.33.0
hooks:
- id: golangci-lint