Skip to content

Commit

Permalink
fix(cmd/gno): change set_exit_status flag to kebab-case (#1304)
Browse files Browse the repository at this point in the history
consistency fix
  • Loading branch information
thehowl authored Oct 26, 2023
1 parent 34d78b3 commit 7dee385
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gnovm/cmd/gno/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func newLintCmd(io *commands.IO) *commands.Command {
func (c *lintCfg) RegisterFlags(fs *flag.FlagSet) {
fs.BoolVar(&c.verbose, "verbose", false, "verbose output when lintning")
fs.StringVar(&c.rootDir, "root-dir", "", "clone location of github.com/gnolang/gno (gno tries to guess it)")
fs.IntVar(&c.setExitStatus, "set_exit_status", 1, "set exit status to 1 if any issues are found")
fs.IntVar(&c.setExitStatus, "set-exit-status", 1, "set exit status to 1 if any issues are found")
}

func execLint(cfg *lintCfg, args []string, io *commands.IO) error {
Expand Down
8 changes: 4 additions & 4 deletions gnovm/cmd/gno/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ func TestLintApp(t *testing.T) {
args: []string{"lint"},
errShouldBe: "flag: help requested",
}, {
args: []string{"lint", "--set_exit_status=0", "../../tests/integ/run-main/"},
args: []string{"lint", "--set-exit-status=0", "../../tests/integ/run-main/"},
stderrShouldContain: "./../../tests/integ/run-main: missing 'gno.mod' file (code=1).",
}, {
args: []string{"lint", "--set_exit_status=0", "../../tests/integ/run-main/"},
args: []string{"lint", "--set-exit-status=0", "../../tests/integ/run-main/"},
stderrShouldContain: "./../../tests/integ/run-main: missing 'gno.mod' file (code=1).",
}, {
args: []string{"lint", "--set_exit_status=0", "../../tests/integ/minimalist-gnomod/"},
args: []string{"lint", "--set-exit-status=0", "../../tests/integ/minimalist-gnomod/"},
// TODO: raise an error because there is a gno.mod, but no .gno files
}, {
args: []string{"lint", "--set_exit_status=0", "../../tests/integ/invalid-module-name/"},
args: []string{"lint", "--set-exit-status=0", "../../tests/integ/invalid-module-name/"},
// TODO: raise an error because gno.mod is invalid
},
// TODO: 'gno mod' is valid?
Expand Down

0 comments on commit 7dee385

Please sign in to comment.