ci: add pre-main workflow for tests and linting#246
ci: add pre-main workflow for tests and linting#246sebrandon1 wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
I love the change, and I'm all for moving golangci-lint up to v2; but now we have to update prow to match :) In fact, maybe with the github actions in place, the prow checks are unneeded? Let's remove them if they are truly redundant, as github actions are generally easier to manage. |
1b058d0 to
92cbbec
Compare
|
@lack I opened a PR here to remove it from prow: openshift/release#72623 |
|
@lack I've rebased the dependent PR (openshift/release#72623) to resolve the merge conflicts. Once that PR gets merged, the prow checks here should pass and we can proceed with merging this one. |
|
/retest |
|
@sebrandon1: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Quality of life improvements.
I added a couple more
makepaths and added some automatic testing and linting for pull requests.One of the biggest changes is that I had to migrate the existing .golangci.yml to v2.
CI/CD and Linting Workflow Enhancements:
.github/workflows/pre-main.yml) to automatically run Go linting (golangci-lint), shell script formatting (shfmt), and tests on pull requests and pushes to themainbranch.lint,golangci-lint, andshfmttargets to theMakefilefor easier local linting and formatting of Go and shell scripts.Linting Configuration Improvements:
.golangci.ymlconfiguration: switched toversion: "2", enabled and fine-tuned a set of linters (includingerrorlint,gocyclo,gosec,loggercheck, etc.), improveddepguardandreviverules, and added exclusions and formatters for better code quality and maintainability. [1] [2] [3]Code Quality and Consistency Fixes:
breakstatements afterappendoperations inaddon-tools/helm-convert/convert/expectedvaluesfinder.gofor cleaner code. [1] [2]pkg/compare/correlator.go.pkg/compare/compare.goby using the correct IOStreams fields.pkg/compare/compare_test.gofor clarity and correctness.pkg/compare/referenceV1.goto use the correct method.pkg/compare/referenceV2.gofor processing manifest paths.