mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-15 20:20:22 +00:00
chore: enable nosprintfhostport linter (#3989)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
This commit is contained in:
parent
dd4fd943b1
commit
005400c606
2 changed files with 2 additions and 3 deletions
|
@ -28,6 +28,7 @@ linters:
|
||||||
- misspell
|
- misspell
|
||||||
- noctx
|
- noctx
|
||||||
- nolintlint
|
- nolintlint
|
||||||
|
- nosprintfhostport
|
||||||
- paralleltest
|
- paralleltest
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- structcheck
|
- structcheck
|
||||||
|
|
|
@ -171,9 +171,7 @@ func generateRule(name string, rule *kyvernov1.Rule, tplKey, shift string, kinds
|
||||||
}
|
}
|
||||||
if len(rule.Validation.ForEachValidation) > 0 && rule.Validation.ForEachValidation != nil {
|
if len(rule.Validation.ForEachValidation) > 0 && rule.Validation.ForEachValidation != nil {
|
||||||
newForeachValidate := make([]kyvernov1.ForEachValidation, len(rule.Validation.ForEachValidation))
|
newForeachValidate := make([]kyvernov1.ForEachValidation, len(rule.Validation.ForEachValidation))
|
||||||
for i, foreach := range rule.Validation.ForEachValidation {
|
copy(newForeachValidate, rule.Validation.ForEachValidation)
|
||||||
newForeachValidate[i] = foreach
|
|
||||||
}
|
|
||||||
rule.Validation = kyvernov1.Validation{
|
rule.Validation = kyvernov1.Validation{
|
||||||
Message: variables.FindAndShiftReferences(logger, rule.Validation.Message, shift, "pattern"),
|
Message: variables.FindAndShiftReferences(logger, rule.Validation.Message, shift, "pattern"),
|
||||||
ForEachValidation: newForeachValidate,
|
ForEachValidation: newForeachValidate,
|
||||||
|
|
Loading…
Add table
Reference in a new issue