Skip to content

Commit

Permalink
Add linter's configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenmarten committed Jun 16, 2024
1 parent f2021b3 commit a822555
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
run:
deadline: 5m
allow-parallel-runners: true

issues:
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
# restore some of the defaults
# (fill in the rest as needed)
exclude-rules:
- path: "api/*"
linters:
- lll
- path: "internal/*"
linters:
- dupl
- lll
linters:
disable-all: true
enable:
- dupl
- errcheck
- exportloopref
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- prealloc
- staticcheck
- typecheck
- unconvert
- unparam
- unused
61 changes: 61 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: "^deploy/helm/(values.schema.json|README.md)$"
- id: check-added-large-files
- repo: local
hooks:
- id: make-fmt
name: make-fmt
entry: sh -c "make fmt"
language: system
- id: make-vet
name: make-vet
entry: sh -c "make vet"
language: system
require_serial: true
- id: make-nilaway-lint
name: make-nilaway-lint
entry: sh -c "make nilaway-lint"
language: system
require_serial: true
# - id: make-lint-fix
# name: make-lint-fix
# entry: sh -c "make lint-fix"
# language: system
# require_serial: true
# - id: make-generate-docs
# name: make-generate-docs
# entry: sh -c "make generate-docs"
# language: system
# require_serial: true
# - id: make-mod-tidy
# name: make-mod-tidy
# entry: sh -c "make mod-tidy"
# language: system
# require_serial: true
# - id: make-helm-lint
# name: make-helm-lint
# entry: sh -c "make helm-lint"
# language: system
# require_serial: true
# - id: make-helm-schema-run
# name: make-helm-schema-run
# entry: sh -c "make helm-schema-run"
# language: system
# require_serial: true
# - id: make-helm-docs-run
# name: make-helm-docs-run
# entry: sh -c "make helm-docs-run"
# language: system
# require_serial: true
# - id: make-helm-crd-copy
# name: make-helm-crd-copy
# entry: sh -c "make helm-crd-copy"
# language: system
# require_serial: true

0 comments on commit a822555

Please sign in to comment.