Skip to content

fix(ci): golangci-lint revive var-naming error in linters #2152

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

Conversation

zakisk
Copy link
Contributor

@zakisk zakisk commented Jun 30, 2025

fixed golangci-lint revive var-naming error in linters. this might be happening due new fix release of golangci-lint hours before golangci/golangci-lint#5904

Changes

Submitter Checklist

  • 📝 Ensure your commit message is clear and informative. Refer to the How to write a git commit message guide. Include the commit message in the PR body rather than linking to an external site (e.g., Jira ticket).

  • ♽ Run make test lint before submitting a PR to avoid unnecessary CI processing. Consider installing pre-commit and running pre-commit install in the repository root for an efficient workflow.

  • ✨ We use linters to maintain clean and consistent code. Run make lint before submitting a PR. Some linters offer a --fix mode, executable with make fix-linters (ensure markdownlint and golangci-lint are installed).

fixed golangci-lint revive var-naming error in linters

Signed-off-by: Zaki Shaikh <[email protected]>
@zakisk zakisk requested a review from chmouel June 30, 2025 13:00
@chmouel
Copy link
Member

chmouel commented Jun 30, 2025

can we disable globally instead in golangci-lint.yaml if we are not using this linter?

@zakisk
Copy link
Contributor Author

zakisk commented Jun 30, 2025

@chmouel I think this is useful for var naming linting and it is enable explicitly golangci.yaml

@chmouel
Copy link
Member

chmouel commented Jun 30, 2025

I don't understand what do you mean, yes it is useful so then why is it disabled and not fixed in this file? you are not really explaining it on your commit message either..

@zakisk
Copy link
Contributor Author

zakisk commented Jun 30, 2025

I don't understand what do you mean, yes it is useful so then why is it disabled and not fixed in this file? you are not really explaining it on your commit message either..

I am disabling it in those package because revive needs meaningful name of packages (types => bbdctypes or something like this would work) but I think those package names are fine but keeping it enabled to lint newly added package in future.

@chmouel chmouel merged commit 87df55c into openshift-pipelines:main Jun 30, 2025
4 checks passed
@chmouel
Copy link
Member

chmouel commented Jun 30, 2025

You should explain in Pull Request more clearly the reasons you are doing things, it makes easier to review....

@zakisk zakisk deleted the fix-golangcilint-revive-var-naming-issue branch June 30, 2025 22:28
@zakisk
Copy link
Contributor Author

zakisk commented Jul 1, 2025

You should explain in Pull Request more clearly the reasons you are doing things, it makes easier to review....

sure, will keep in mind (sorry)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants