Skip to content

ci: add pr checks workflow#9

Merged
giraffesyo merged 1 commit intocanaryfrom
pr-checks
Jan 29, 2026
Merged

ci: add pr checks workflow#9
giraffesyo merged 1 commit intocanaryfrom
pr-checks

Conversation

@giraffesyo
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings January 29, 2026 02:09
@giraffesyo giraffesyo changed the title build: add pr checks workflow ci: add pr checks workflow Jan 29, 2026
@giraffesyo giraffesyo merged commit 5c84e37 into canary Jan 29, 2026
2 of 3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds CI/CD infrastructure for automated linting of Go code by introducing a golangci-lint configuration file and a GitHub Actions workflow to run linting checks on pull requests.

Changes:

  • Added .golangci.yml configuration file with linter settings for Go code quality checks
  • Added .github/workflows/lint.yml workflow to run golangci-lint on pull requests to the canary branch

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.golangci.yml Configures golangci-lint with various linters and rules for Go code quality enforcement
.github/workflows/lint.yml Defines GitHub Actions workflow to run golangci-lint on pull requests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .golangci.yml
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.
Comment thread .golangci.yml
Comment on lines +12 to +29
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
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.
Comment thread .golangci.yml
Comment on lines +30 to +38
exclusions:
presets:
- std-error-handling
rules:
- path: '(.+)_test\.go'
linters:
- errcheck
- text: 'unused-parameter'
source: 'cobra\.Command'
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants