Skip to content
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

Update golangci-lint to v2.0.2 #299

Merged
merged 12 commits into from
Apr 1, 2025
Merged

Conversation

belimawr
Copy link
Contributor

@belimawr belimawr commented Mar 25, 2025

elastic/beats#42026 Is updating the GitHub Actions and lint configuration (.golangci.yml) to V2. Because we need a total of 3 PRs to get all changes into Beats, there will be a brief period when running mage llc on Beats will fail due to the version miss-match.

What does this PR do?

See title

Why is it important?

It fixes some issues we're seeing in Beats, e.g:

filebeat/input/filestream/input_test.go:25:2: could not import sync/atomic (-: could not load export data: internal error in importing "sync/atomic" (unsupported version: 2); please report an issue) (typecheck)
        "sync/atomic"
        ^

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

## Author's Checklist

Related issues

@belimawr belimawr added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Mar 25, 2025
@belimawr belimawr self-assigned this Mar 25, 2025
@belimawr belimawr requested a review from a team as a code owner March 25, 2025 22:46
@belimawr belimawr requested review from leehinman and khushijain21 and removed request for a team March 25, 2025 22:46
leehinman
leehinman previously approved these changes Mar 26, 2025
pierrehilbert
pierrehilbert previously approved these changes Mar 26, 2025
mauri870
mauri870 previously approved these changes Mar 26, 2025
@belimawr belimawr changed the title Update golangci-lint to the latest v1 release Update golangci-lint to v2.0.2 Mar 26, 2025
@belimawr belimawr dismissed stale reviews from mauri870, pierrehilbert, and leehinman via 056975b March 26, 2025 23:15
@belimawr
Copy link
Contributor Author

Folks, I finished updating all configuration files. It's ready for review again.

mauri870
mauri870 previously approved these changes Mar 31, 2025
Copy link
Member

@mauri870 mauri870 left a comment

Choose a reason for hiding this comment

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

LGTM, I don't see anything obviously wrong with the config.

@michel-laterman
Copy link
Contributor

fyi i update the linter to v1.64.8 to unblock another pr, you will likely need to do some minor changes @belimawr

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @belimawr

@belimawr belimawr merged commit 63b0cac into elastic:main Apr 1, 2025
5 checks passed
@belimawr belimawr deleted the update-golangci-lint branch April 1, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

golangci-lint fails with could not load export data: internal error in importing "sync/atomic"
6 participants