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
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
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
38 changes: 38 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: "2"

linters:
default: standard
Copy link

Copilot AI Jan 29, 2026

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'.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The golangci-lint configuration structure is incorrect. The 'settings' section should be a top-level key, not nested under 'linters'. According to golangci-lint v2 configuration format, the correct structure should have 'linters' and 'linters-settings' as separate top-level keys. The 'settings' section should be moved out from under 'linters' and renamed to 'linters-settings'.

Copilot uses AI. Check for mistakes.
exclusions:
presets:
- std-error-handling
rules:
- path: '(.+)_test\.go'
linters:
- errcheck
- text: 'unused-parameter'
source: 'cobra\.Command'
Comment on lines +30 to +38
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The 'exclusions' section should be a top-level key named 'issues', not nested under 'linters'. According to golangci-lint v2 configuration format, exclusions should be configured under a top-level 'issues' key with 'exclude-rules' for rule-based exclusions. This section should be moved out from under 'linters' and restructured accordingly.

Suggested change
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'

Copilot uses AI. Check for mistakes.
Loading