Files
gh-action-readme/.pre-commit-config.yaml
Ismo Vuorinen 7f80105ff5 feat: go 1.25.5, dependency updates, renamed internal/errors (#129)
* feat: rename internal/errors to internal/apperrors

* fix(tests): clear env values before using in tests

* feat: rename internal/errors to internal/apperrors

* chore(deps): update go and all dependencies

* chore: remove renovate from pre-commit, formatting

* chore: sonarcloud fixes

* feat: consolidate constants to appconstants/constants.go

* chore: sonarcloud fixes

* feat: simplification, deduplication, test utils

* chore: sonarcloud fixes

* chore: sonarcloud fixes

* chore: sonarcloud fixes

* chore: sonarcloud fixes

* chore: clean up

* fix: config discovery, const deduplication

* chore: fixes
2026-01-01 23:17:29 +02:00

80 lines
2.1 KiB
YAML

---
repos:
# Built-in pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: detect-private-key
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude: "^testdata/"
- id: check-case-conflict
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
exclude: "^testdata/"
- id: end-of-file-fixer
exclude: "^testdata/"
- id: mixed-line-ending
args: [--fix=auto]
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
# YAML formatting with yamlfmt (replaces yamllint for formatting)
- repo: https://github.com/google/yamlfmt
rev: v0.20.0
hooks:
- id: yamlfmt
exclude: "^testdata/"
# Markdown linting with markdownlint-cli2 (excluding legacy files)
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.20.0
hooks:
- id: markdownlint-cli2
args: [--fix]
exclude: "^testdata/"
# EditorConfig checking
- repo: https://github.com/editorconfig-checker/editorconfig-checker
rev: v3.6.0
hooks:
- id: editorconfig-checker
alias: ec
# Go formatting, imports, and linting
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.4
hooks:
- id: go-imports-repo
args: [-w]
- id: go-mod-tidy
- id: golangci-lint-repo-mod
args: [--fix]
# Shell formatting and linting
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.12.0-2
hooks:
- id: shfmt
# GitHub Actions linting
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
hooks:
- id: actionlint
args: ["-shellcheck="]
# Commit message linting
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.23.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]