mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
Merge pull request #117551 from pohly/lint-pull-requests
golangci-lint: allow exceptions for Go naming convention
This commit is contained in:
commit
1def77f05c
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user