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
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ jobs:

- name: Dead code
run: |
DEAD=$(go run golang.org/x/tools/cmd/deadcode@v0.51.0 -test ./...)
DEAD=$(go run golang.org/x/tools/cmd/deadcode@v0.52.0 -test ./...)
if [ -n "$DEAD" ]; then echo "$DEAD"; exit 1; fi

- name: Vulnerabilities
run: go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
run: go run golang.org/x/vuln/cmd/govulncheck@v1.9.0 ./...

- name: Mocks up to date
run: |
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Datalogger polls **devices** and forwards every reading to one or more **outputs
make check # ./scripts/pre-commit.sh, check-only
golangci-lint fmt --config .golangci.yml # gofumpt + goimports
golangci-lint run --config .golangci.yml # full linter set (section 10)
go run golang.org/x/tools/cmd/deadcode@v0.51.0 -test ./... # unused exported code
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./... # known vulnerabilities
go run golang.org/x/tools/cmd/deadcode@v0.52.0 -test ./... # unused exported code
go run golang.org/x/vuln/cmd/govulncheck@v1.9.0 ./... # known vulnerabilities
go test -race ./... # all unit tests, as in CI
go tool mockery # regenerate mocks (.mockery.yaml)
make build # ./datalogger with version info (ldflags)
Expand Down
4 changes: 2 additions & 2 deletions scripts/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ print_result $? "golangci-lint run"

# 3. Unused exported code (golangci's unused only sees unexported identifiers)
echo "Checking for dead code..."
DEAD=$(go run golang.org/x/tools/cmd/deadcode@v0.51.0 -test ./... 2>&1)
DEAD=$(go run golang.org/x/tools/cmd/deadcode@v0.52.0 -test ./... 2>&1)
if [ -n "$DEAD" ]; then
echo "$DEAD"
print_result 1 "deadcode"
Expand All @@ -60,7 +60,7 @@ fi

# 4. Known vulnerabilities in dependencies and the standard library
echo "Checking for vulnerabilities..."
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
go run golang.org/x/vuln/cmd/govulncheck@v1.9.0 ./...
print_result $? "govulncheck"

# 5. Build
Expand Down
Loading