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

Replace deprecated golint with revive #415

Merged
merged 1 commit into from
May 14, 2024

Conversation

A-Kamaee
Copy link
Contributor

@A-Kamaee A-Kamaee commented May 14, 2024

Summary

The golint linter has been deprecated since v1.41.0 (June 15, 2021). Recently, on April 27, 2024, golangci-lint replaced the deprecation warning with an error for deprecated linters, including golint (reference). As a result, our CI pipeline began to fail due to the usage of golint.

Changes

  • Removed golint: golint has been removed from our golangci-lint configuration due to its deprecation and the subsequent error enforcement in golangci-lint.
  • Added revive: Integrated revive as a replacement linter to continue maintaining code quality standards.

Details

  • Configuration:
    • Enabled revive in .golangci.yml.
    • Disabled golint to prevent pipeline failures.
    • Configured revive to ensure it aligns with our previous golint settings and added necessary rules for maintaining code quality.
  • Cyclomatic Complexity:
    • Maintained gocyclo configuration with a minimum complexity threshold set to 20.

Benefits

  • Compliance: Aligns our project with the latest golangci-lint standards and prevents CI pipeline failures.
  • Code Quality: Continues to enforce code quality checks using a maintained and actively supported linter (revive).

Reference Links

Testing

  • Verified the updated configuration by running golangci-lint locally and ensuring no new issues were introduced.
  • Confirmed that the CI pipeline passes successfully with the updated linter configuration.

@A-Kamaee A-Kamaee changed the title Due to deprecation of golint replace it with revive. Replace deprecated golint with revive May 14, 2024
@A-Kamaee A-Kamaee marked this pull request as ready for review May 14, 2024 10:13
@otrosien
Copy link
Member

👍

2 similar comments
@A-Kamaee
Copy link
Contributor Author

👍

@mikkeloscar
Copy link
Collaborator

👍

@mikkeloscar mikkeloscar merged commit 7ba2452 into zalando-incubator:master May 14, 2024
4 checks passed
@A-Kamaee
Copy link
Contributor Author

Thanks for prompt approval. 🙏

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.

3 participants