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
2 changes: 1 addition & 1 deletion .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
persist-credentials: false

- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Ignorables.

# Docs
docs/_build

# IDEs
.idea

Expand Down
9 changes: 9 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ linters:
- unparam
- unused
- whitespace
settings:
goconst:
# Repeated literals in tests are idiomatic and are excluded from
# reporting below, so they should not inflate counts for real code either.
ignore-tests: true
exclusions:
generated: lax
presets:
Expand All @@ -33,8 +38,12 @@ linters:
- legacy
- std-error-handling
rules:
# Repeated literals in table-driven tests are idiomatic, and long test
# tables are not complexity debt, so goconst/gocognit are not useful here.
- linters:
- bodyclose
- gocognit
- goconst
- gosec
- noctx
- unparam
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,20 @@ gocyclo:
@ go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
gocyclo -over 25 -avg -ignore "vendor" .

# Mirrors the Lint step in .github/workflows/build_and_test.yml. Deliberately
# not part of `test` while pre-existing complexity findings are outstanding;
# CI runs it with continue-on-error for the same reason.
lint:
@ command -v golangci-lint >/dev/null 2>&1 || { \
echo "golangci-lint not found. Install it: https://golangci-lint.run/docs/welcome/install/"; \
exit 1; \
}
golangci-lint run

test: fmtcheck staticcheck vet
go test ./*.go $(TESTARGS)

version:
@echo $(VERSION)

.PHONY: clean test fmtcheck staticcheck vet gocyclo version testdeps cross build_dir default install
.PHONY: clean test fmtcheck staticcheck vet lint gocyclo version testdeps cross build_dir default install
Loading
Loading