Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a pre-commit setup to the repository. #2176

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_install_hook_types: ["pre-push"]
exclude: '(^vendor|.*golden$)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-shebang-scripts-are-executable
- id: check-json
- id: check-vcs-permalinks
- id: detect-private-key
exclude: ".*_test.go"
- repo: local
hooks:
- id: lint-go
name: "Lint GO"
entry: make
args: ["lint-go"]
language: system
types: [go]
pass_filenames: false
- id: test
name: "Unit testing"
entry: make
args: ["test"]
language: system
types: [go]
pass_filenames: false
- id: lint-yaml
name: "Lint YAML"
entry: make
args: ["lint-yaml"]
language: system
types: [yaml]
pass_filenames: false
Loading