Skip to content

Commit

Permalink
cmd/test: Deprecate -l flag to show line numbers
Browse files Browse the repository at this point in the history
This flag and the underlying logic to report the line number is not
needed anymore. We have a better solution with the location
info on the pretty tracer.

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
  • Loading branch information
tsandall committed Apr 17, 2020
1 parent d15195d commit a90187a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ If the '--bundle' option is specified the paths will be treated as policy bundle
and loaded following standard bundle conventions. The path can be a compressed archive
file or a directory which will be treated as a bundle. Without the '--bundle' flag OPA
will recursively load ALL *.rego, *.json, and *.yaml files for evaluating the test cases.
Example policy (example/authz.rego):
package authz
Expand Down Expand Up @@ -329,6 +329,7 @@ func filterTrace(params *testCommandParams, trace []*topdown.Event) []*topdown.E
func init() {
testCommand.Flags().BoolVarP(&testParams.verbose, "verbose", "v", false, "set verbose reporting mode")
testCommand.Flags().BoolVarP(&testParams.failureLine, "show-failure-line", "l", false, "show test failure line")
testCommand.Flags().MarkDeprecated("show-failure-line", "use -v instead")
testCommand.Flags().DurationVarP(&testParams.timeout, "timeout", "t", time.Second*5, "set test timeout")
testCommand.Flags().VarP(testParams.outputFormat, "format", "f", "set output format")
testCommand.Flags().BoolVarP(&testParams.coverage, "coverage", "c", false, "report coverage (overrides debug tracing)")
Expand Down

0 comments on commit a90187a

Please sign in to comment.