Update full linter list and enable some easily resolved new ones

This commit is contained in:
Katrina Verey
2022-03-30 14:07:54 -04:00
parent 0a9c5cb0cf
commit 71bf0d5d14
61 changed files with 185 additions and 184 deletions

View File

@@ -1170,6 +1170,7 @@ func TestCmd_Execute_enableLogSteps(t *testing.T) {
}
func getGeneratorFilterProvider(t *testing.T) func(runtimeutil.FunctionSpec, *yaml.RNode, currentUserFunc) (kio.Filter, error) {
t.Helper()
return func(f runtimeutil.FunctionSpec, node *yaml.RNode, currentUser currentUserFunc) (kio.Filter, error) {
return kio.FilterFunc(func(items []*yaml.RNode) ([]*yaml.RNode, error) {
if f.Container.Image == "generate" {
@@ -1238,6 +1239,7 @@ metadata:
// setupTest initializes a temp test directory containing test data
func setupTest(t *testing.T) string {
t.Helper()
dir, err := ioutil.TempDir("", "kustomize-kyaml-test")
if !assert.NoError(t, err) {
t.FailNow()
@@ -1264,6 +1266,7 @@ func setupTest(t *testing.T) string {
// a filter to s/kind: Deployment/kind: StatefulSet/g.
// this can be used to simulate running a filter.
func getFilterProvider(t *testing.T) func(runtimeutil.FunctionSpec, *yaml.RNode, currentUserFunc) (kio.Filter, error) {
t.Helper()
return func(f runtimeutil.FunctionSpec, node *yaml.RNode, currentUser currentUserFunc) (kio.Filter, error) {
// parse the filter from the input
filter := yaml.YFilter{}