Skip to content

Commit 5ea6006

Browse files
committed
Tweak CLI flag name
Signed-off-by: Nat Karmios <nat@karmios.com>
1 parent b096764 commit 5ea6006

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

bin/print_rules.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ let term =
357357
& opt (enum Output_format.all) Output_format.Sexp
358358
& info [ "format" ] ~docv:"FORMAT" ~doc:(Some doc))
359359
and+ with_locs =
360-
Arg.(value & flag & info [ "with_locs" ] ~doc:(Some "Include locations of rules"))
360+
Arg.(value & flag & info [ "with-locs" ] ~doc:(Some "Include locations of rules"))
361361
(* CR-someday Alizter: document this option *)
362362
and+ targets = Arg.(value & pos_all dep [] & Arg.info [] ~docv:"TARGET" ~doc:None) in
363363
let targets =

test/blackbox-tests/test-cases/print-rules.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Tests for the output of `dune rules`, covering:
22
- anonymous actions (actions attached to an alias) showing up as rules;
3-
- rule locations being omitted unless `--with_locs` is passed;
3+
- rule locations being omitted unless `--with-locs` is passed;
44
- defaulting to the `@default` alias when no target is given.
55

66
$ cat > dune-project << EOF
@@ -32,16 +32,16 @@ By default, rule locations are omitted from the output.
3232
(context default)
3333
(action (chdir _build/default (with-stdout-to t (echo x)))))
3434

35-
Passing `--with_locs` includes the location of each rule.
36-
$ dune rules --with_locs t
35+
Passing `--with-locs` includes the location of each rule.
36+
$ dune rules --with-locs t
3737
((deps ())
3838
(targets ((files (_build/default/t)) (directories ())))
3939
(context default)
4040
(action (chdir _build/default (with-stdout-to t (echo x))))
4141
(loc dune:4))
4242

4343
Anonymous actions carry a location too.
44-
$ dune rules --with_locs @a
44+
$ dune rules --with-locs @a
4545
((deps ())
4646
(action (chdir _build/default (echo "hi\n")))
4747
(aliases (a))
@@ -56,7 +56,7 @@ file, not just its basename.
5656
> (action (echo "sub\n")))
5757
> EOF
5858

59-
$ dune rules --with_locs @sub/b
59+
$ dune rules --with-locs @sub/b
6060
((deps ())
6161
(action (chdir _build/default/sub (echo "sub\n")))
6262
(aliases (b))

0 commit comments

Comments
 (0)