Skip to content

Update golangci config #694

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chung-coder
Copy link

@chung-coder chung-coder commented Mar 7, 2025

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 verify resulted in errors due to incorrect or incompatible configuration.
  • Linters like golint and scopelint were used, but they were deprecated and caused validation issues.
  • The configuration had overlapping or conflicting settings for certain linters.

After:

  • Replaced deprecated linters:

    • golintrevive for better configurability and active maintenance.
    • scopelintcopyloopvar to improve variable scope analysis.
  • Updated golangci.yml settings:

    • Corrected and simplified the configuration for revive, govet, unused, and cyclop.
    • Explicitly set rules for revive to enforce line-length-limit: 120.
    • Removed unnecessary settings and streamlined the linter configurations to avoid conflicts.
  • Fixed validation issues:

    • Configured exclude-rules to exclude _test.go files from testpackage linter, preventing unnecessary checks for test files.
    • Adjusted the cyclop complexity limit to 7 for improved analysis.

Signed commits

  • Yes, I signed my commits.

Copy link

welcome bot commented Mar 7, 2025

Yay, your first pull request! 👍 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.

@leecalcote
Copy link
Member

Thank you, @chung-coder!

Will you:

  1. Review our approach to golanglint-ci in the https://github.com/meshery/meshery repo? We'll want to ensure a consistent approach, making changes here, there, or both places.
  2. Will you sign your commit? One-time instructions here. Permanent instructions here.

@leecalcote leecalcote added area/ci Continuous integration | Build and release language/go Golang related labels Mar 7, 2025
@hortison
Copy link
Member

No response from @chung-coder

@hortison
Copy link
Member

Marking PR as abandoned...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Continuous integration | Build and release language/go Golang related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lint Check workflow is failing
3 participants