diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 12cf21c..a01f85b 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -87,6 +87,20 @@ jobs: scc --format html-table . | tee -a $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY + - name: lint + run: | + echo "## Lint" >> $GITHUB_STEP_SUMMARY + + # Pinned, as the coverage tool is: this module builds with the Go + # of its go.mod (1.26, GOTOOLCHAIN=local), and a golangci-lint + # whose go directive is newer does not install. v2.15.0 declares + # go 1.26.0. Raise it with the go directive. The linters it runs + # are .golangci.yaml's. + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.15.0 + + golangci-lint run ./... | tee -a $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + - name: test run: | echo "### Test report" >> $GITHUB_STEP_SUMMARY diff --git a/DEVELOPMENT_GUIDELINES.md b/DEVELOPMENT_GUIDELINES.md index a021bee..0f15e31 100644 --- a/DEVELOPMENT_GUIDELINES.md +++ b/DEVELOPMENT_GUIDELINES.md @@ -8,6 +8,7 @@ Follows these guidelines precisely to ensure consistency and maintainability of - Language: Go (Go 1.22+) - Framework: Go standard library - Testing: Go's built-in testing package +- Lint: golangci-lint, with the linters `.golangci.yaml` enables, in the pull request workflow - Dependency Management: Go modules - Version Control: Git - Documentation: go doc