Merge pull request #117551 from pohly/lint-pull-requests

golangci-lint: allow exceptions for Go naming convention
This commit is contained in:
Kubernetes Prow Robot 2023-04-24 09:51:02 -07:00 committed by GitHub
commit 1def77f05c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -15,6 +15,12 @@ issues:
- path: conversion\.go
linters:
- ineffassign
# The Kubernetes naming convention for conversion functions uses underscores
# and intentionally deviates from normal Go conventions to make those function
# names more readable. Same for SetDefaults_*.
- linters:
- stylecheck
text: "ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)"
linters:
disable-all: false # in contrast to golangci.yaml, the default set of linters remains enabled

View File

@ -16,6 +16,12 @@ issues:
- path: (pkg/volume/*|test/*|azure/*|pkg/cmd/wait*|request/bearertoken/*|metrics/*|filters/*) # not in golangci-strict.yaml
linters: # not in golangci-strict.yaml
- gocritic # not in golangci-strict.yaml
# The Kubernetes naming convention for conversion functions uses underscores
# and intentionally deviates from normal Go conventions to make those function
# names more readable. Same for SetDefaults_*.
- linters:
- stylecheck
text: "ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)"
linters:
disable-all: true # not disabled in golangci-strict.yaml