Add codespell config, pre-commit definition, and move options from Makefile

Signed-off-by: Yaroslav Halchenko <debian@onerussian.com>
This commit is contained in:
Yaroslav Halchenko
2024-07-24 10:29:12 -10:00
parent 8578fddf0f
commit 4700b5a58a
3 changed files with 13 additions and 1 deletions

6
.codespellrc Normal file
View File

@ -0,0 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = bin,vendor,.git,go.sum,.cirrus.yml,"*.fish,RELEASE_NOTES.md,*.xz,*.gz,*.ps1,*.tar,swagger.yaml,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go
check-hidden = true
ignore-regex = \b(Not|assert)In\b
ignore-words-list = ddress,secon,passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif,whit

View File

@ -20,3 +20,8 @@ repos:
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-yaml
- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in .codespellrc
rev: v2.2.6
hooks:
- id: codespell

View File

@ -307,7 +307,8 @@ test/version/version: version/version.go
.PHONY: codespell
codespell:
codespell -S bin,vendor,.git,go.sum,.cirrus.yml,"*.fish,RELEASE_NOTES.md,*.xz,*.gz,*.ps1,*.tar,swagger.yaml,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L ddress,secon,passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif -w
# Configuration for codespell is in .codespellrc
codespell -w
# Code validation target that **DOES NOT** require building podman binaries
.PHONY: validate-source