Skip to content

Commit

Permalink
wmllint: put off dryrun's verbosity check until after options are pro…
Browse files Browse the repository at this point in the history
…cessed

Per discussion with Elvish Hunter on the forum. Having dryrun check for a
minimum verbosity level during the options for loop meant that -vd would
set the verbosity level to 1, while -dv would set it to 2.
  • Loading branch information
groggyd88 committed May 15, 2014
1 parent cc059b6 commit ec3c65d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/tools/wmllint
Expand Up @@ -2654,7 +2654,6 @@ if __name__ == '__main__':
clean = True
elif switch in ('-d', '--dryrun'):
dryrun = True
verbose = max(1, verbose)
elif switch in ('-D', '--diffs'):
diffs = True
elif switch in ('-f', '--future'):
Expand All @@ -2673,6 +2672,8 @@ if __name__ == '__main__':
dospellcheck = False
elif switch in ('-K', '--known'):
inconsistency = True
if dryrun:
verbose = max(1, verbose)
if clean and revert:
sys.stderr.write("wmllint: can't do clean and revert together.\n")
sys.exit(1)
Expand Down

0 comments on commit ec3c65d

Please sign in to comment.