Skip to content

chore: migrate to golangci-lint v2 and modernize configuration#196

Open
2004Pruthvi wants to merge 1 commit intomeshery-extensions:masterfrom
2004Pruthvi:chore/modernize-linter-config
Open

chore: migrate to golangci-lint v2 and modernize configuration#196
2004Pruthvi wants to merge 1 commit intomeshery-extensions:masterfrom
2004Pruthvi:chore/modernize-linter-config

Conversation

@2004Pruthvi
Copy link
Copy Markdown

Description:
This PR modernizes the .golangci.yml to align with v1.62 standards. This was split from #195 to maintain atomic contributions as suggested by @lekaf974.
​Changes:
​Migrated gomnd to mnd in exclude-rules for version compatibility.
​Removed deprecated service and legacy skip-dirs blocks.
​Updated internal linter settings to the current schema.
​Related: #195

Signed-off-by: pruthvi@2004 <165915900+2004Pruthvi@users.noreply.github.com>
@lekaf974
Copy link
Copy Markdown

lekaf974 commented Apr 3, 2026

@2004Pruthvi thanks for contrbution, Please could you move to golangci-lint v2 which is the latest version. We did upgrade in some other projects

@2004Pruthvi
Copy link
Copy Markdown
Author

Updated to golangci-lint v2!
​I have:
​Set version: 2 in the config.
​Migrated depguard to the new rules schema (removing the deprecated list-type).
​Updated gci local-prefixes to meshery-cilium for correct import grouping.
​Verified that all linter names (like mnd) are compatible with the v2 runner.
​This aligns the Cilium adapter with the latest standards used in the main Meshery repo. Ready for review!

@lekaf974
Copy link
Copy Markdown

lekaf974 commented Apr 4, 2026

please update PR title accordingly to your latest changes

.golangci.yml Outdated
statements: 50
gci:
local-prefixes: github.com/golangci/golangci-lint
local-prefixes: github.com/meshery/meshery-cilium
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why this changes ?

also the repo should be github.com/meshery-extensions/meshery-cilium

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done! I have corrected the repository path to github.com/meshery-extensions/meshery-cilium and removed the duplicate local-prefixes entry. I've also updated the PR title to reflect the v2 migration.
​Verified the YAML structure—this is now ready for a final review and merge! CC: @lekaf974

@2004Pruthvi 2004Pruthvi changed the title chore: modernize golangci-lint configuration to v1.62 chore: migrate to golangci-lint v2 and modernize configuration Apr 6, 2026
@2004Pruthvi 2004Pruthvi force-pushed the chore/modernize-linter-config branch 2 times, most recently from 3827063 to 2f5c76b Compare April 6, 2026 04:17
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