Skip to content

Commit

Permalink
Address reviews
Browse files Browse the repository at this point in the history
Signed-off-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
  • Loading branch information
oguzhand95 committed Apr 5, 2023
1 parent 2475881 commit 2c42c61
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
5 changes: 1 addition & 4 deletions cmd/cerbos/compile/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import (
"os"
"os/signal"

"github.com/cerbos/cerbos/cmd/cerbos/compile/internal/verification"

"github.com/cerbos/cerbos/cmd/cerbos/compile/internal/verification"

"github.com/alecthomas/kong"
"github.com/fatih/color"
"github.com/pterm/pterm"
Expand All @@ -25,6 +21,7 @@ import (
internalcompile "github.com/cerbos/cerbos/cmd/cerbos/compile/internal/compilation"
"github.com/cerbos/cerbos/cmd/cerbos/compile/internal/flagset"
"github.com/cerbos/cerbos/cmd/cerbos/compile/internal/lint"
"github.com/cerbos/cerbos/cmd/cerbos/compile/internal/verification"
"github.com/cerbos/cerbos/internal/compile"
"github.com/cerbos/cerbos/internal/engine"
"github.com/cerbos/cerbos/internal/outputcolor"
Expand Down
2 changes: 1 addition & 1 deletion cmd/cerbos/compile/internal/flagset/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type VerificationOutputFormat string

func (v *VerificationOutputFormat) Validate() error {
if !(*v == "tree" || *v == "list" || *v == "json" || *v == "junit") {
return fmt.Errorf("available options are tree, list, json or junit")
return fmt.Errorf("valid options are tree, list, json or junit")
}

return nil
Expand Down
21 changes: 10 additions & 11 deletions docs/modules/cli/pages/cerbos.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,18 @@ Arguments:
<dir> Policy directory
Flags:
-h, --help Show context-sensitive help.
-h, --help Show context-sensitive help.
--version
--ignore-schemas Ignore schemas during compilation
--tests=STRING Path to the directory containing tests. Defaults to policy directory.
--run=STRING Run only tests that match this regex
--skip-tests Skip tests
-o, --output="tree" Output format (tree,list,json)
--test-output="unspecified" Test output format. If unspecified matches the value of the output flag. (unspecified,tree,list,json,junit)
--color=COLOR Output color level (auto,never,always,256,16m). Defaults to auto.
--no-color Disable colored output
--verbose Verbose output on test failure
--ignore-schemas Ignore schemas during compilation
--tests=STRING Path to the directory containing tests. Defaults to policy directory.
--run=STRING Run only tests that match this regex
--skip-tests Skip tests
-o, --output="tree" Output format (tree,list,json)
--test-output=TEST-OUTPUT Test output format. If unspecified matches the value of the output flag. (tree,list,json,junit)
--color=COLOR Output color level (auto,never,always,256,16m). Defaults to auto.
--no-color Disable colored output
--verbose Verbose output on test failure
----

[#healthcheck]
Expand Down

0 comments on commit 2c42c61

Please sign in to comment.