diff --git a/go.mod b/go.mod index 4cc4bc6..fc4f2f0 100644 --- a/go.mod +++ b/go.mod @@ -12,11 +12,7 @@ require ( helm.sh/helm/v3 v3.15.4 ) -require ( - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/pkg/errors v0.9.1 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect -) +require github.com/hashicorp/errwrap v1.1.0 // indirect require ( github.com/Masterminds/semver/v3 v3.2.1 // indirect diff --git a/go.sum b/go.sum index 2ea14ef..fbc1829 100644 --- a/go.sum +++ b/go.sum @@ -10,7 +10,6 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -39,8 +38,6 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -93,5 +90,3 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= helm.sh/helm/v3 v3.15.4 h1:UFHd6oZ1IN3FsUZ7XNhOQDyQ2QYknBNWRHH57e9cbHY= helm.sh/helm/v3 v3.15.4/go.mod h1:phOwlxqGSgppCY/ysWBNRhG3MtnpsttOzxaTK+Mt40E= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/linters/openapi/library.go b/pkg/linters/openapi/library.go index bec7755..6e9590d 100644 --- a/pkg/linters/openapi/library.go +++ b/pkg/linters/openapi/library.go @@ -87,7 +87,6 @@ func RunOpenAPIValidator(fileC chan fileValidation) chan fileValidation { continue } - //runFileParser(strings.TrimPrefix(vfile.filePath, vfile.rootPath), yamlStruct, parseResultC) runFileParser(vfile.filePath, yamlStruct, parseResultC) var result *multierror.Error @@ -257,7 +256,6 @@ func (fp fileParser) parseValue(upperKey string, v any) { case reflect.Slice: fp.parseSlice(upperKey, v.([]any)) default: - } } diff --git a/pkg/linters/openapi/validators/enum.go b/pkg/linters/openapi/validators/enum.go index 9b73853..a4f7563 100644 --- a/pkg/linters/openapi/validators/enum.go +++ b/pkg/linters/openapi/validators/enum.go @@ -24,7 +24,7 @@ func NewEnumValidator() EnumValidator { } } -func (en EnumValidator) Run(fileName, absoluteKey string, value any) error { +func (en EnumValidator) Run(_, absoluteKey string, value any) error { // check for slice path with wildcard index := arrayPathRegex.FindString(absoluteKey) if index != "" { diff --git a/pkg/manager/manager.go b/pkg/manager/manager.go index be4e8cc..e54e5aa 100644 --- a/pkg/manager/manager.go +++ b/pkg/manager/manager.go @@ -62,11 +62,7 @@ func NewManager(dirs []string, cfg *config.Config) *Manager { } for i := range paths { - mdl := module.NewModule(paths[i]) - //if mdl.Chart == nil { - // continue - //} - m.Modules = append(m.Modules, mdl) + m.Modules = append(m.Modules, module.NewModule(paths[i])) } return m diff --git a/pkg/module/module.go b/pkg/module/module.go index e464f02..e38094c 100644 --- a/pkg/module/module.go +++ b/pkg/module/module.go @@ -34,13 +34,6 @@ func NewModule(path string) *Module { Path: path, } - //var err error - //module.Chart, err = loader.Load(path) - //if err != nil { - // logger.ErrorF("Failed to load module %s: %s\n", module.Name, err) - // return &Module{} - //} - return module }