Skip to content

Commit 9068bec

Browse files
authored
Merge pull request kubernetes#120454 from pohly/golangci-lint-hint-deprecated
golangci-lint: warn about deprecated APIs only as hints
2 parents 80cd9d7 + c4dd16a commit 9068bec

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

hack/golangci-strict.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ issues:
8383
- gosimple
8484
text: "S1033: unnecessary guard around call to delete"
8585

86+
# Didn't make it into https://github.com/kubernetes/kubernetes/issues/117288.
87+
# Discussion on Slack concluded that "it's hard to have a universal policy for all
88+
# functions marked deprecated" and thus this can only be a hint which must
89+
# be considered on a case-by-case basis.
90+
- linters:
91+
- staticcheck
92+
text: "SA1019: .*is deprecated"
93+
8694
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507030071
8795
- linters:
8896
- stylecheck

hack/golangci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ issues:
8989
- gosimple
9090
text: "S1033: unnecessary guard around call to delete"
9191

92+
# Didn't make it into https://github.com/kubernetes/kubernetes/issues/117288.
93+
# Discussion on Slack concluded that "it's hard to have a universal policy for all
94+
# functions marked deprecated" and thus this can only be a hint which must
95+
# be considered on a case-by-case basis.
96+
- linters:
97+
- staticcheck
98+
text: "SA1019: .*is deprecated"
99+
92100
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507030071
93101
- linters:
94102
- stylecheck

hack/golangci.yaml.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ issues:
9494
- gosimple
9595
text: "S1033: unnecessary guard around call to delete"
9696

97+
# Didn't make it into https://github.com/kubernetes/kubernetes/issues/117288.
98+
# Discussion on Slack concluded that "it's hard to have a universal policy for all
99+
# functions marked deprecated" and thus this can only be a hint which must
100+
# be considered on a case-by-case basis.
101+
- linters:
102+
- staticcheck
103+
text: "SA1019: .*is deprecated"
104+
97105
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507030071
98106
- linters:
99107
- stylecheck

0 commit comments

Comments
 (0)