Skip to content

Exclude third-party source from golangci-lint #11293

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

Merged
merged 1 commit into from
Jul 14, 2025
Merged
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
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ linters:
# set, and we should have separate work to enable them if we truly want them.
- staticcheck
- errcheck
exclusions:
paths:
- third-party
Comment on lines +11 to +13
Copy link
Preview

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

The exclusions configuration appears to be incorrectly nested under the linters section. According to golangci-lint documentation, exclusions should be configured under the issues section or use the skip-dirs option under the run section. Consider moving this to the correct section, such as: run: skip-dirs: - third-party

Suggested change
exclusions:
paths:
- third-party
run:
skip-dirs:
- third-party

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

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

As I checked there's no such option under run or issues sections (docs).


formatters:
enable:
Expand Down
Loading