Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
go mod verify
go mod download

LINT_VERSION=1.64.8
LINT_VERSION=2.1.6
curl -fsSL https://github.com/golangci/golangci-lint/releases/download/v${LINT_VERSION}/golangci-lint-${LINT_VERSION}-linux-amd64.tar.gz | \
tar xz --strip-components 1 --wildcards \*/golangci-lint
mkdir -p bin && mv golangci-lint bin/
Expand All @@ -45,6 +45,6 @@ jobs:
assert-nothing-changed go fmt ./...
assert-nothing-changed go mod tidy

bin/golangci-lint run --out-format=colored-line-number --timeout=3m || STATUS=$?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the replacement, if any, for --out-format=colored-line-number?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colored-line-number has been enabled by default.

I suppose the --out-format has been removed.

bin/golangci-lint run --timeout=3m || STATUS=$?

exit $STATUS
21 changes: 14 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# https://golangci-lint.run/usage/configuration
version: "2"

run:
timeout: 5m
tests: true
Expand All @@ -8,21 +11,25 @@ linters:
- govet
- errcheck
- staticcheck
- gofmt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@radar07 can you talk me through these removals? Are they somewhere else? Were they removed? Are they in core?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- goimports
- revive
- ineffassign
- typecheck
- unused
- gosimple
- misspell
- nakedret
- bodyclose
- gocritic
- makezero
- gosec

formatters:
enable:
- gci
- gofmt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@radar07 I removed gci and golines. I like them but they aren't included in most people's workflows and the errors can be opaque for example:

internal/ghmcp/server.go:17:1: File is not properly formatted (gci)

^

Totally unclear how to fix unless you understand what gci is. Not worth the hassle.

- goimports
- golines

output:
formats: colored-line-number
print-issued-lines: true
print-linter-name: true
formats:
text:
print-linter-name: true
print-issued-lines: true