Update golangci config
Description
This PR fixes #693
Notes for Reviewers
This PR updates golangci.yml by replacing deprecated linters and refining linting configurations for better code quality.
Before:
- Running
golangci-lint config verifyresulted in errors due to incorrect or incompatible configuration. - Linters like
golintandscopelintwere used, but they were deprecated and caused validation issues. - The configuration had overlapping or conflicting settings for certain linters.
After:
-
Replaced deprecated linters:
golint→revivefor better configurability and active maintenance.scopelint→copyloopvarto improve variable scope analysis.
-
Updated
golangci.ymlsettings:- Corrected and simplified the configuration for
revive,govet,unused, andcyclop. - Explicitly set rules for
reviveto enforceline-length-limit: 120. - Removed unnecessary settings and streamlined the linter configurations to avoid conflicts.
- Corrected and simplified the configuration for
-
Fixed validation issues:
- Configured
exclude-rulesto exclude_test.gofiles fromtestpackagelinter, preventing unnecessary checks for test files. - Adjusted the
cyclopcomplexity limit to 7 for improved analysis.
- Configured
Signed commits
- [x] Yes, I signed my commits.
Yay, your first pull request! :thumbsup: A contributor will be by to give feedback soon. In the meantime, you can find updates in the #github-notifications channel in the community Slack. Be sure to double-check that you have signed your commits. Here are instructions for making signing an implicit activity while performing a commit.
Thank you, @chung-coder!
Will you:
No response from @chung-coder
Marking PR as abandoned...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue.