-
Notifications
You must be signed in to change notification settings - Fork 1
ci: add pr checks workflow #9
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Lint | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - canary | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| golangci-lint: | ||
| name: golangci-lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.25.4' | ||
|
|
||
| - name: Run golangci-lint | ||
| uses: golangci/golangci-lint-action@v7 | ||
| with: | ||
| version: latest |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,38 @@ | ||||||||||||||||||||||||||||||||||||
| version: "2" | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| linters: | ||||||||||||||||||||||||||||||||||||
| default: standard | ||||||||||||||||||||||||||||||||||||
| enable: | ||||||||||||||||||||||||||||||||||||
| - gocritic | ||||||||||||||||||||||||||||||||||||
| - revive | ||||||||||||||||||||||||||||||||||||
| - misspell | ||||||||||||||||||||||||||||||||||||
| - unconvert | ||||||||||||||||||||||||||||||||||||
| - unparam | ||||||||||||||||||||||||||||||||||||
| - errorlint | ||||||||||||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||||||||||||
| errcheck: | ||||||||||||||||||||||||||||||||||||
| check-type-assertions: true | ||||||||||||||||||||||||||||||||||||
| govet: | ||||||||||||||||||||||||||||||||||||
| enable-all: true | ||||||||||||||||||||||||||||||||||||
| disable: | ||||||||||||||||||||||||||||||||||||
| - fieldalignment | ||||||||||||||||||||||||||||||||||||
| gocritic: | ||||||||||||||||||||||||||||||||||||
| enabled-tags: | ||||||||||||||||||||||||||||||||||||
| - diagnostic | ||||||||||||||||||||||||||||||||||||
| - style | ||||||||||||||||||||||||||||||||||||
| - performance | ||||||||||||||||||||||||||||||||||||
| revive: | ||||||||||||||||||||||||||||||||||||
| rules: | ||||||||||||||||||||||||||||||||||||
| - name: blank-imports | ||||||||||||||||||||||||||||||||||||
| - name: exported | ||||||||||||||||||||||||||||||||||||
| - name: unreachable-code | ||||||||||||||||||||||||||||||||||||
| - name: unused-parameter | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+12
to
+29
|
||||||||||||||||||||||||||||||||||||
| exclusions: | ||||||||||||||||||||||||||||||||||||
| presets: | ||||||||||||||||||||||||||||||||||||
| - std-error-handling | ||||||||||||||||||||||||||||||||||||
| rules: | ||||||||||||||||||||||||||||||||||||
| - path: '(.+)_test\.go' | ||||||||||||||||||||||||||||||||||||
| linters: | ||||||||||||||||||||||||||||||||||||
| - errcheck | ||||||||||||||||||||||||||||||||||||
| - text: 'unused-parameter' | ||||||||||||||||||||||||||||||||||||
| source: 'cobra\.Command' | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+30
to
+38
|
||||||||||||||||||||||||||||||||||||
| exclusions: | |
| presets: | |
| - std-error-handling | |
| rules: | |
| - path: '(.+)_test\.go' | |
| linters: | |
| - errcheck | |
| - text: 'unused-parameter' | |
| source: 'cobra\.Command' | |
| issues: | |
| exclude-rules: | |
| - path: '(.+)_test\.go' | |
| linters: | |
| - errcheck | |
| - text: 'unused-parameter' | |
| source: 'cobra\.Command' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'default' field under 'linters' is not a valid configuration option in golangci-lint. If you want to enable default linters, you don't need to specify anything, or you can use 'disable-all: false'. If 'standard' refers to a preset, there is no such preset in golangci-lint configuration. This line should be removed or replaced with valid configuration options like 'enable-all', 'disable-all', 'enable', or 'disable'.