-
Notifications
You must be signed in to change notification settings - Fork 413
/
list_output.ex
63 lines (51 loc) · 2.43 KB
/
list_output.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
defmodule Credo.CLI.Command.List.ListOutput do
@moduledoc false
use Credo.CLI.Output.FormatDelegator,
default: Credo.CLI.Command.List.Output.Default,
flycheck: Credo.CLI.Command.List.Output.FlyCheck,
oneline: Credo.CLI.Command.List.Output.Oneline,
json: Credo.CLI.Command.List.Output.Json
alias Credo.CLI.Output.UI
def print_help(exec) do
usage = ["Usage: ", :olive, "mix credo list [paths] [options]"]
description = """
Lists objects that Credo thinks can be improved ordered by their priority.
"""
example = [
"Example: ",
:olive,
:faint,
"$ mix credo list lib/**/*.ex --format oneline"
]
options = """
Arrows (↑ ↗ → ↘ ↓) hint at the importance of an issue.
List options:
-a, --all Show all issues
-A, --all-priorities Show all issues including low priority ones
-c, --checks Only include checks that match the given strings
--checks-with-tag Only include checks that match the given tag (can be used multiple times)
--checks-without-tag Ignore checks that match the given tag (can be used multiple times)
--config-file Use the given config file
-C, --config-name Use the given config instead of "default"
--enable-disabled-checks Re-enable disabled checks that match the given strings
--files-included Only include these files (accepts globs, can be used multiple times)
--files-excluded Exclude these files (accepts globs, can be used multiple times)
--format Display the list in a specific format (json,flycheck,oneline)
-i, --ignore-checks Ignore checks that match the given strings
--ignore Alias for --ignore-checks
--min-priority Minimum priority to show issues (high,medium,normal,low,lower or number)
--mute-exit-status Exit with status zero even if there are issues
--only Alias for --checks
--strict Alias for --all-priorities
General options:
--[no-]color Toggle colored output
-v, --version Show version
-h, --help Show this help
"""
UI.puts(usage)
UI.puts(description)
UI.puts(example)
UI.puts(options)
exec
end
end