Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues/211: re-enable golangci-lint #214

Merged
merged 4 commits into from
Feb 3, 2023
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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
- name: install tools
run: |
set -x
go install honnef.co/go/tools/cmd/staticcheck@master
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/securego/gosec/cmd/gosec@latest
go install github.com/quasilyte/go-ruleguard/cmd/ruleguard@latest
go install github.com/orijtech/structslop/cmd/structslop@latest
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
wget -nc --output-document=/tmp/semgrep-go.zip https://github.com/dgryski/semgrep-go/archive/refs/heads/master.zip
unzip -o /tmp/semgrep-go.zip -d /tmp/semgrep-go
go get github.com/quasilyte/go-ruleguard/dsl
# golangci-lint run --config .golangci.yml ./...
golangci-lint run --config .golangci.yml ./...
go mod tidy
python -m venv /tmp/.venv
. /tmp/.venv/bin/activate
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Most recent version is listed first.
## v0.0.30
- Update to Go v1.20: https://github.com/komuw/ong/pull/209
- Use net.Dialer.ControlContext instead of use net.Dialer.Control: https://github.com/komuw/ong/pull/212
- Re-enable golangci-lint: https://github.com/komuw/ong/pull/214

## v0.0.29
- WithCtx should only use the id from context, if that ctx actually contains an Id: https://github.com/komuw/ong/pull/196
Expand Down
2 changes: 1 addition & 1 deletion id/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func Random(n int) string {
//lint:ignore SA1019 `mathRand.Read` is deprecated.
// However, for our case here is okay since the func id.Random is not used for cryptography.
// Also we like the property of `mathRand.Read` always returning a nil error.
_, _ = mathRand.Read(b) // docs say that it always returns a nil error.
_, _ = mathRand.Read(b) // nolint:staticcheck
}

return enc.EncodeToString(b)[:n]
Expand Down