chore(tooling): Improve CI pipeline and expand pre-commit hooks

Expands the pre-commit configuration with a wider range of hooks to enforce file quality, validation, security, and Git safety checks.

The CI pipeline is updated to:
- Correct the `golangci-lint` format command to `fmt`.
- Enable CGO for test execution to support the race detector.
- Improve the robustness of test report parsing scripts.

Additionally, this commit includes minor stylistic and formatting cleanups across various project files.
This commit is contained in:
2025-11-07 07:26:21 +01:00
parent e7de5d044a
commit 8d606706e2
16 changed files with 245 additions and 225 deletions

View File

@ -316,13 +316,13 @@ tasks:
docker:run:
desc: Run Docker container
aliases: [dr]
deps: [docker:build]
deps: ['docker:build']
cmds:
- docker run --rm {{.APP_NAME}}:{{.VERSION}} --help
docker:test:
desc: Test Docker image
deps: [docker:build]
deps: ['docker:build']
cmds:
- docker run --rm {{.APP_NAME}}:{{.VERSION}} --version
- echo "Docker image tested successfully"
@ -434,7 +434,7 @@ tasks:
docs:coverage:
desc: Open coverage report in browser
deps: [test:coverage]
deps: ['test:coverage']
cmds:
- '{{if eq OS "darwin"}}open {{.COVERAGE_DIR}}/coverage.html{{else if eq OS "windows"}}start {{.COVERAGE_DIR}}/coverage.html{{else}}xdg-open {{.COVERAGE_DIR}}/coverage.html 2>/dev/null || echo "Please open {{.COVERAGE_DIR}}/coverage.html in your browser"{{end}}'