Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # tag=v9.2.0
with:
version: v2.8.0
version: v2.10.1
args: --output.text.print-linter-name=true --output.text.colors=true --timeout 10m
working-directory: ${{matrix.working-directory}}
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ linters:
- linters:
- revive
path: .*/internal/.*
# Allow 'version' as a package name even though it conflicts with Go 1.24+ stdlib
- linters:
- revive
path: tools/setup-envtest/version/.*\.go$
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's just use the nolint comments consistently for this one instead of also adding an exclude here?

Copy link
Member Author

@dongjiang1989 dongjiang1989 Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sbueringer
Fixed
So many nolint add, just add in .golangci.yml

text: 'var-naming: avoid package names that conflict with Go standard library package names'
- linters:
- unused
# Seems to incorrectly trigger on the two implementations that are only
Expand Down
2 changes: 1 addition & 1 deletion pkg/certwatcher/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package metrics
package metrics //nolint:revive

import (
"github.com/prometheus/client_golang/prometheus"
Expand Down
2 changes: 1 addition & 1 deletion pkg/log/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package log
package log //nolint:revive

Check failure on line 17 in pkg/log/log_test.go

View workflow job for this annotation

GitHub Actions / lint

directive `//nolint:revive` is unused for linter "revive" (nolintlint)

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/workqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package metrics
package metrics //nolint:revive

Check failure on line 17 in pkg/metrics/workqueue.go

View workflow job for this annotation

GitHub Actions / lint

directive `//nolint:revive` is unused for linter "revive" (nolintlint)

// Metrics subsystem and all keys used by the workqueue.
const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/webhook/admission/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package metrics
package metrics //nolint:revive

import (
"github.com/prometheus/client_golang/prometheus"
Expand Down
2 changes: 0 additions & 2 deletions tools/setup-envtest/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

Expand Down
Loading