1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/pkg/engine/mutate
Dhaval Shah fce35b91d2
[Bugbash] Kceu22 bugbash/fix staticcheck warnings (#3917)
* cleanup: error string formating

Fixes Staticcheck ST1005
KubeCon EU 2022 BugBash

Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>

* cleanup: merge var declaration with assignment

Fixes staticcheck S1021

Kubecon EU 2022 Bugbash

Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>

* cleanup normalize yoda condition to simple compare

fixes staticcheck ST1017

Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>

* cleanup: remove extraneous err param on executeTest

err is not used anywhere except to throw Fatal inside execureTest()
fix staticcheck SA4009

Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>

* fix: match validation error message to actual errors

Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>

* cleanup: more of normalize validation error messages

Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>

* cleanup: additional error message formatting fixes

Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>

Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-14 22:04:35 +01:00
..
patch [Bugbash] Kceu22 bugbash/fix staticcheck warnings (#3917) 2022-05-14 22:04:35 +01:00
mutation.go refactor: remove some api unnecessary pointers (#3704) 2022-04-28 12:41:10 +08:00
mutation_test.go refactor: imported pkg redeclared and a few other unused func (#3827) 2022-05-07 16:44:57 +00:00