Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
  • Loading branch information
juev committed Sep 12, 2024
1 parent e80625a commit 4ed2d87
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 25 deletions.
6 changes: 1 addition & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -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=
2 changes: 0 additions & 2 deletions pkg/linters/openapi/library.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -257,7 +256,6 @@ func (fp fileParser) parseValue(upperKey string, v any) {
case reflect.Slice:
fp.parseSlice(upperKey, v.([]any))
default:

}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/linters/openapi/validators/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down
6 changes: 1 addition & 5 deletions pkg/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions pkg/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 4ed2d87

Please sign in to comment.