-
Notifications
You must be signed in to change notification settings - Fork 2
chore: upgrade golangci lint version to v2 #114
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
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the golangci-lint version to v2 and adjusts linter configuration and related code comments to work with the new version. Key changes include:
- Addition of //nolint:staticcheck comments to suppress linter warnings.
- Replacement of deprecated function calls and variable naming adjustments.
- Redefinition of the .golangci.yml configuration structure.
Reviewed Changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/e2e/framework/dashboard.go | Updated helm chart lookup call using the new API. |
| pkg/dashboard/cluster.go | Renamed an internal error variable to remove the underscore. |
| .golangci.yml | Revised configuration to comply with golangci-lint v2 schema. |
| (Other files) | Addition of //nolint:staticcheck for linter compliance. |
Files not reviewed (1)
- Makefile: Language not supported
Comments suppressed due to low confidence (3)
pkg/dashboard/cluster.go:66
- The renaming of the error variable to remove the underscore prefix improves consistency; ensure that all references to this variable are updated accordingly.
errReadOnClosedResBody = errors.New("http: read on closed response body")
test/e2e/framework/dashboard.go:280
- Review the new usage of install.LocateChart against the updated library docs to ensure that the parameters and behavior match the intended functionality.
chartPath, err := install.LocateChart("api7/api7ee3", cli.New())
.golangci.yml:1
- Verify that the updated .golangci.yml configuration structure (including the new sections and exclusions) is fully supported by your CI environment and golangci-lint v2.
version: "2"
conformance test reportapiVersion: gateway.networking.k8s.io/v1
date: "2025-04-27T05:31:39Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
contact: null
organization: API7
project: api7-ingress-controller
url: https://github.com/api7/api7-ingress-controller.git
version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
result: partial
skippedTests:
- GatewayInvalidTLSConfiguration
- GatewaySecretInvalidReferenceGrant
- GatewaySecretMissingReferenceGrant
- GatewaySecretReferenceGrantAllInNamespace
- GatewaySecretReferenceGrantSpecific
- HTTPRouteExactPathMatching
- HTTPRouteHTTPSListener
- HTTPRouteHeaderMatching
- HTTPRouteHostnameIntersection
- HTTPRouteInvalidBackendRefUnknownKind
- HTTPRouteInvalidCrossNamespaceBackendRef
- HTTPRouteInvalidCrossNamespaceParentRef
- HTTPRouteInvalidNonExistentBackendRef
- HTTPRouteInvalidParentRefNotMatchingSectionName
- HTTPRouteInvalidReferenceGrant
- HTTPRouteListenerHostnameMatching
- HTTPRouteMatching
- HTTPRouteMatchingAcrossRoutes
- HTTPRoutePartiallyInvalidViaInvalidReferenceGrant
- HTTPRouteReferenceGrant
- HTTPRouteRequestHeaderModifier
- HTTPRouteWeight
statistics:
Failed: 0
Passed: 11
Skipped: 22
name: GATEWAY-HTTP
summary: Core tests partially succeeded with 22 test skips. |
Signed-off-by: ashing <[email protected]>
dspo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job
Signed-off-by: ashing [email protected]
Type of change:
What this PR does / why we need it:
Pre-submission checklist: