diff --git a/cmd/analyzer/main.go b/cmd/analyzer/main.go index eeefee6b..79212bf8 100644 --- a/cmd/analyzer/main.go +++ b/cmd/analyzer/main.go @@ -47,8 +47,8 @@ var ( ) func init() { - rootCmd.Flags().StringVar(&settingsFile, "settings-file", "provider_settings.json", "path to the provider settings") - rootCmd.Flags().StringArrayVar(&rulesFile, "rules-file", []string{"rule-example.yaml"}, "filename or directory containing rule files") + rootCmd.Flags().StringVar(&settingsFile, "provider-settings", "provider_settings.json", "path to the provider settings") + rootCmd.Flags().StringArrayVar(&rulesFile, "rules", []string{"rule-example.yaml"}, "filename or directory containing rule files") rootCmd.Flags().StringVar(&outputViolations, "output-file", "output.yaml", "filepath to to store rule violations") rootCmd.Flags().BoolVar(&errorOnViolations, "error-on-violation", false, "exit with 3 if any violation are found will also print violations to console") rootCmd.Flags().StringVar(&labelSelector, "label-selector", "", "an expression to select rules based on labels") diff --git a/go.mod b/go.mod index b6a21e3c..930de582 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/go-logr/logr v1.2.3 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 github.com/sirupsen/logrus v1.9.0 - github.com/spf13/pflag v1.0.5 + github.com/spf13/cobra v1.7.0 go.lsp.dev/uri v0.3.0 go.opentelemetry.io/otel/trace v1.11.2 google.golang.org/grpc v1.54.0 @@ -21,7 +21,7 @@ require ( require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect ) require ( @@ -40,7 +40,7 @@ require ( go.opentelemetry.io/otel v1.11.2 go.opentelemetry.io/otel/exporters/jaeger v1.11.2 go.opentelemetry.io/otel/sdk v1.11.2 - golang.org/x/net v0.8.0 // indirect + golang.org/x/net v0.8.0 golang.org/x/sys v0.6.0 // indirect golang.org/x/text v0.8.0 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect diff --git a/go.sum b/go.sum index bdbe5411..5d70a32b 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,6 @@ github.com/bombsimon/logrusr/v3 v3.0.0 h1:tcAoLfuAhKP9npBxWzSdpsvKPQt1XV02nSf2lZ github.com/bombsimon/logrusr/v3 v3.0.0/go.mod h1:PksPPgSFEL2I52pla2glgCyyd2OqOHAnFF5E+g8Ixco= github.com/cbroglie/mustache v1.3.0 h1:sj24GVYl8G7MH4b3zaROGsZnF8X79JqtjMx8/6H/nXM= github.com/cbroglie/mustache v1.3.0/go.mod h1:w58RIHjw/L7DPyRX2CcCTduNmcP1dvztaHP72ciSfh0= -github.com/cbroglie/mustache v1.4.0 h1:Azg0dVhxTml5me+7PsZ7WPrQq1Gkf3WApcHMjMprYoU= -github.com/cbroglie/mustache v1.4.0/go.mod h1:SS1FTIghy0sjse4DUVGV1k/40B1qE1XkD9DtDsHo9iM= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=