mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Merge pull request #121504 from pohly/golangci-lint-godoc
golangci-lint: enable doc comment checking for cmd/kubeadm
This commit is contained in:
commit
84fb7b5ce0
@ -24,6 +24,15 @@ output:
|
|||||||
issues:
|
issues:
|
||||||
max-issues-per-linter: 0
|
max-issues-per-linter: 0
|
||||||
max-same-issues: 0
|
max-same-issues: 0
|
||||||
|
|
||||||
|
# The default excludes disable the "should have comment or be unexported" check from revive.
|
||||||
|
# We want that to be enabled, therefore we have to disable all default excludes and
|
||||||
|
# add those back one-by-one that we want. See https://github.com/golangci/golangci-lint/issues/456#issuecomment-617470264
|
||||||
|
exclude-use-default: false
|
||||||
|
exclude:
|
||||||
|
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
|
||||||
|
- ineffective break statement. Did you mean to break out of the outer loop
|
||||||
|
|
||||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
# exclude ineffassign linter for generated files for conversion
|
# exclude ineffassign linter for generated files for conversion
|
||||||
@ -45,7 +54,8 @@ issues:
|
|||||||
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1514201592
|
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1514201592
|
||||||
- linters:
|
- linters:
|
||||||
- stylecheck
|
- stylecheck
|
||||||
text: "ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)"
|
- revive
|
||||||
|
text: "(ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)|exported: exported function (Convert|SetDefaults)_.* should be of the form)"
|
||||||
|
|
||||||
# This check currently has some false positives (https://github.com/nunnatsa/ginkgolinter/issues/91).
|
# This check currently has some false positives (https://github.com/nunnatsa/ginkgolinter/issues/91).
|
||||||
- linters:
|
- linters:
|
||||||
@ -66,6 +76,7 @@ linters:
|
|||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- logcheck
|
- logcheck
|
||||||
|
- revive
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
- stylecheck
|
||||||
- unused
|
- unused
|
||||||
@ -86,6 +97,12 @@ linters-settings: # please keep this alphabetized
|
|||||||
- p: \.Extract
|
- p: \.Extract
|
||||||
pkg: ^k8s\.io/client-go/applyconfigurations/
|
pkg: ^k8s\.io/client-go/applyconfigurations/
|
||||||
msg: should not be used because managedFields was removed
|
msg: should not be used because managedFields was removed
|
||||||
|
revive:
|
||||||
|
# Only these rules are enabled.
|
||||||
|
rules:
|
||||||
|
- name: exported
|
||||||
|
arguments:
|
||||||
|
- disableStutteringCheck
|
||||||
staticcheck:
|
staticcheck:
|
||||||
checks:
|
checks:
|
||||||
- "all"
|
- "all"
|
||||||
|
@ -24,6 +24,15 @@ output:
|
|||||||
issues:
|
issues:
|
||||||
max-issues-per-linter: 0
|
max-issues-per-linter: 0
|
||||||
max-same-issues: 0
|
max-same-issues: 0
|
||||||
|
|
||||||
|
# The default excludes disable the "should have comment or be unexported" check from revive.
|
||||||
|
# We want that to be enabled, therefore we have to disable all default excludes and
|
||||||
|
# add those back one-by-one that we want. See https://github.com/golangci/golangci-lint/issues/456#issuecomment-617470264
|
||||||
|
exclude-use-default: false
|
||||||
|
exclude:
|
||||||
|
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
|
||||||
|
- ineffective break statement. Did you mean to break out of the outer loop
|
||||||
|
|
||||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
# exclude ineffassign linter for generated files for conversion
|
# exclude ineffassign linter for generated files for conversion
|
||||||
@ -45,7 +54,8 @@ issues:
|
|||||||
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1514201592
|
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1514201592
|
||||||
- linters:
|
- linters:
|
||||||
- stylecheck
|
- stylecheck
|
||||||
text: "ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)"
|
- revive
|
||||||
|
text: "(ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)|exported: exported function (Convert|SetDefaults)_.* should be of the form)"
|
||||||
|
|
||||||
# This check currently has some false positives (https://github.com/nunnatsa/ginkgolinter/issues/91).
|
# This check currently has some false positives (https://github.com/nunnatsa/ginkgolinter/issues/91).
|
||||||
- linters:
|
- linters:
|
||||||
@ -83,6 +93,12 @@ issues:
|
|||||||
- gosimple
|
- gosimple
|
||||||
text: "S1033: unnecessary guard around call to delete"
|
text: "S1033: unnecessary guard around call to delete"
|
||||||
|
|
||||||
|
# Only packages listed here opt into the strict "exported symbols must be documented".
|
||||||
|
- linters:
|
||||||
|
- revive
|
||||||
|
text: "(exported: exported .* or be unexported|exported: comment on exported.*should be of the form)"
|
||||||
|
path-except: cmd/kubeadm
|
||||||
|
|
||||||
# Didn't make it into https://github.com/kubernetes/kubernetes/issues/117288.
|
# Didn't make it into https://github.com/kubernetes/kubernetes/issues/117288.
|
||||||
# Discussion on Slack concluded that "it's hard to have a universal policy for all
|
# Discussion on Slack concluded that "it's hard to have a universal policy for all
|
||||||
# functions marked deprecated" and thus this can only be a hint which must
|
# functions marked deprecated" and thus this can only be a hint which must
|
||||||
@ -110,6 +126,7 @@ linters:
|
|||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- logcheck
|
- logcheck
|
||||||
|
- revive
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
- stylecheck
|
||||||
- unused
|
- unused
|
||||||
@ -133,6 +150,12 @@ linters-settings: # please keep this alphabetized
|
|||||||
- p: \.Extract
|
- p: \.Extract
|
||||||
pkg: ^k8s\.io/client-go/applyconfigurations/
|
pkg: ^k8s\.io/client-go/applyconfigurations/
|
||||||
msg: should not be used because managedFields was removed
|
msg: should not be used because managedFields was removed
|
||||||
|
revive:
|
||||||
|
# Only these rules are enabled.
|
||||||
|
rules:
|
||||||
|
- name: exported
|
||||||
|
arguments:
|
||||||
|
- disableStutteringCheck
|
||||||
staticcheck:
|
staticcheck:
|
||||||
checks:
|
checks:
|
||||||
- "all"
|
- "all"
|
||||||
|
@ -24,6 +24,15 @@ output:
|
|||||||
issues:
|
issues:
|
||||||
max-issues-per-linter: 0
|
max-issues-per-linter: 0
|
||||||
max-same-issues: 0
|
max-same-issues: 0
|
||||||
|
|
||||||
|
# The default excludes disable the "should have comment or be unexported" check from revive.
|
||||||
|
# We want that to be enabled, therefore we have to disable all default excludes and
|
||||||
|
# add those back one-by-one that we want. See https://github.com/golangci/golangci-lint/issues/456#issuecomment-617470264
|
||||||
|
exclude-use-default: false
|
||||||
|
exclude:
|
||||||
|
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
|
||||||
|
- ineffective break statement. Did you mean to break out of the outer loop
|
||||||
|
|
||||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
# exclude ineffassign linter for generated files for conversion
|
# exclude ineffassign linter for generated files for conversion
|
||||||
@ -51,7 +60,8 @@ issues:
|
|||||||
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1514201592
|
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1514201592
|
||||||
- linters:
|
- linters:
|
||||||
- stylecheck
|
- stylecheck
|
||||||
text: "ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)"
|
- revive
|
||||||
|
text: "(ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)|exported: exported function (Convert|SetDefaults)_.* should be of the form)"
|
||||||
|
|
||||||
# This check currently has some false positives (https://github.com/nunnatsa/ginkgolinter/issues/91).
|
# This check currently has some false positives (https://github.com/nunnatsa/ginkgolinter/issues/91).
|
||||||
- linters:
|
- linters:
|
||||||
@ -89,6 +99,12 @@ issues:
|
|||||||
- gosimple
|
- gosimple
|
||||||
text: "S1033: unnecessary guard around call to delete"
|
text: "S1033: unnecessary guard around call to delete"
|
||||||
|
|
||||||
|
# Only packages listed here opt into the strict "exported symbols must be documented".
|
||||||
|
- linters:
|
||||||
|
- revive
|
||||||
|
text: "(exported: exported .* or be unexported|exported: comment on exported.*should be of the form)"
|
||||||
|
path-except: cmd/kubeadm
|
||||||
|
|
||||||
# Didn't make it into https://github.com/kubernetes/kubernetes/issues/117288.
|
# Didn't make it into https://github.com/kubernetes/kubernetes/issues/117288.
|
||||||
# Discussion on Slack concluded that "it's hard to have a universal policy for all
|
# Discussion on Slack concluded that "it's hard to have a universal policy for all
|
||||||
# functions marked deprecated" and thus this can only be a hint which must
|
# functions marked deprecated" and thus this can only be a hint which must
|
||||||
@ -116,6 +132,7 @@ linters:
|
|||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- logcheck
|
- logcheck
|
||||||
|
- revive
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
- stylecheck
|
||||||
- unused
|
- unused
|
||||||
@ -140,6 +157,12 @@ linters-settings: # please keep this alphabetized
|
|||||||
enabled-checks:
|
enabled-checks:
|
||||||
- equalFold
|
- equalFold
|
||||||
- boolExprSimplify
|
- boolExprSimplify
|
||||||
|
revive:
|
||||||
|
# Only these rules are enabled.
|
||||||
|
rules:
|
||||||
|
- name: exported
|
||||||
|
arguments:
|
||||||
|
- disableStutteringCheck
|
||||||
staticcheck:
|
staticcheck:
|
||||||
checks:
|
checks:
|
||||||
- "all"
|
- "all"
|
||||||
|
@ -24,6 +24,15 @@ output:
|
|||||||
issues:
|
issues:
|
||||||
max-issues-per-linter: 0
|
max-issues-per-linter: 0
|
||||||
max-same-issues: 0
|
max-same-issues: 0
|
||||||
|
|
||||||
|
# The default excludes disable the "should have comment or be unexported" check from revive.
|
||||||
|
# We want that to be enabled, therefore we have to disable all default excludes and
|
||||||
|
# add those back one-by-one that we want. See https://github.com/golangci/golangci-lint/issues/456#issuecomment-617470264
|
||||||
|
exclude-use-default: false
|
||||||
|
exclude:
|
||||||
|
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
|
||||||
|
- ineffective break statement. Did you mean to break out of the outer loop
|
||||||
|
|
||||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
# exclude ineffassign linter for generated files for conversion
|
# exclude ineffassign linter for generated files for conversion
|
||||||
@ -54,7 +63,8 @@ issues:
|
|||||||
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1514201592
|
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1514201592
|
||||||
- linters:
|
- linters:
|
||||||
- stylecheck
|
- stylecheck
|
||||||
text: "ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)"
|
- revive
|
||||||
|
text: "(ST1003: should not use underscores in Go names; func (Convert_.*_To_.*|SetDefaults_)|exported: exported function (Convert|SetDefaults)_.* should be of the form)"
|
||||||
|
|
||||||
# This check currently has some false positives (https://github.com/nunnatsa/ginkgolinter/issues/91).
|
# This check currently has some false positives (https://github.com/nunnatsa/ginkgolinter/issues/91).
|
||||||
- linters:
|
- linters:
|
||||||
@ -94,6 +104,12 @@ issues:
|
|||||||
- gosimple
|
- gosimple
|
||||||
text: "S1033: unnecessary guard around call to delete"
|
text: "S1033: unnecessary guard around call to delete"
|
||||||
|
|
||||||
|
# Only packages listed here opt into the strict "exported symbols must be documented".
|
||||||
|
- linters:
|
||||||
|
- revive
|
||||||
|
text: "(exported: exported .* or be unexported|exported: comment on exported.*should be of the form)"
|
||||||
|
path-except: cmd/kubeadm
|
||||||
|
|
||||||
# Didn't make it into https://github.com/kubernetes/kubernetes/issues/117288.
|
# Didn't make it into https://github.com/kubernetes/kubernetes/issues/117288.
|
||||||
# Discussion on Slack concluded that "it's hard to have a universal policy for all
|
# Discussion on Slack concluded that "it's hard to have a universal policy for all
|
||||||
# functions marked deprecated" and thus this can only be a hint which must
|
# functions marked deprecated" and thus this can only be a hint which must
|
||||||
@ -122,6 +138,7 @@ linters:
|
|||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- logcheck
|
- logcheck
|
||||||
|
- revive
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
- stylecheck
|
||||||
- unused
|
- unused
|
||||||
@ -153,6 +170,12 @@ linters-settings: # please keep this alphabetized
|
|||||||
- equalFold
|
- equalFold
|
||||||
- boolExprSimplify
|
- boolExprSimplify
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
revive:
|
||||||
|
# Only these rules are enabled.
|
||||||
|
rules:
|
||||||
|
- name: exported
|
||||||
|
arguments:
|
||||||
|
- disableStutteringCheck
|
||||||
staticcheck:
|
staticcheck:
|
||||||
checks:
|
checks:
|
||||||
- "all"
|
- "all"
|
||||||
|
Loading…
Reference in New Issue
Block a user