Skip to content
Merged
Show file tree
Hide file tree
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
15 changes: 13 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ linters-settings:
- name: unused-parameter
- name: var-declaration
- name: var-naming
govet:
check-shadowing: true
enable-all: true

linters:
enable:
enable:
- asciicheck
- bidichk
- dupword
- errcheck
- errorlint
- gofmt
Expand All @@ -45,15 +50,21 @@ linters:
- misspell
- nilerr
- noctx
- perfsprint
- predeclared
- reassign
- revive
- staticcheck
- tagalign
- tparallel
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
disable-all: true
- whitespace
disable-all: true
issues:
max-issues-per-linter: 0
max-same-issues: 0
Expand Down
68 changes: 29 additions & 39 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,37 @@
# 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: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-case-conflict
- id: check-vcs-permalinks
- id: mixed-line-ending
args: [--fix=lf]
- id: no-commit-to-branch
- id: fix-byte-order-marker
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-case-conflict
- id: check-vcs-permalinks
- id: mixed-line-ending
args: [--fix=lf]
- id: no-commit-to-branch
- id: fix-byte-order-marker

- repo: local
hooks:
- id: golang-diff
name: create-go-diff
entry: bash -c 'git diff -p origin/main > /tmp/diff.patch'
language: system
types: [go]
pass_filenames: false
- repo: https://github.com/golangci/golangci-lint
rev: v1.55.2
hooks:
- id: golangci-lint-full

- repo: https://github.com/golangci/golangci-lint
rev: v1.55.2
hooks:
- id: golangci-lint
args: [--new-from-patch=/tmp/diff.patch]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks

- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.12.1
hooks:
- id: markdownlint-cli2
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.12.1
hooks:
- id: markdownlint-cli2

ci:
skip: [golang-diff, golangci-lint]
skip: [golangci-lint-full]
Loading