1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00
kyverno/pkg/policy
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
..
common updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
generate chore: enable whitespace linter (#3864) 2022-05-10 17:01:29 +00:00
mutate fix: CRD generation (#3334) 2022-03-06 11:07:51 -08:00
validate refactor: remove some api unnecessary pointers (#3704) 2022-04-28 12:41:10 +08:00
actions.go [Bugbash] Kceu22 bugbash/fix staticcheck warnings (#3917) 2022-05-14 22:04:35 +01:00
allowed_vars_test.go skip var checks in attestations (#3876) 2022-05-11 09:31:48 +00:00
apply.go chore: enable whitespace linter (#3864) 2022-05-10 17:01:29 +00:00
background.go refactor: imported pkg redeclared and a few other unused func (#3827) 2022-05-07 16:44:57 +00:00
background_test.go redo variable validation (#2647) 2021-11-03 11:16:55 -07:00
common.go refactor: imported pkg redeclared and a few other unused func (#3827) 2022-05-07 16:44:57 +00:00
existing.go chore: enable whitespace linter (#3864) 2022-05-10 17:01:29 +00:00
metrics.go chore: enable deadcode and unused linters (#3861) 2022-05-10 17:06:48 +02:00
on_update_policy_test.go Load mutate.targets via dclient (#3797) 2022-05-06 05:46:36 +00:00
policy_controller.go refactor: make config vars private (#3823) 2022-05-11 06:14:30 +00:00
report.go refactor: make config vars private (#3823) 2022-05-11 06:14:30 +00:00
updaterequest.go refactor: make config vars private (#3823) 2022-05-11 06:14:30 +00:00
utils.go feat: trigger generate on existing matched resource (#3819) 2022-05-09 07:13:11 +00:00
utils_test.go tests: add unit tests for utils functions (#3857) 2022-05-10 13:45:48 +00:00
validate.go skip var checks in attestations (#3876) 2022-05-11 09:31:48 +00:00
validate_test.go refactor: match and exclude conflict validation (#3454) 2022-03-23 17:04:17 +05:30