zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

info_output.ex (2297B)


      1 defmodule Credo.CLI.Command.Info.InfoOutput do
      2   @moduledoc false
      3 
      4   use Credo.CLI.Output.FormatDelegator,
      5     default: Credo.CLI.Command.Info.Output.Default,
      6     json: Credo.CLI.Command.Info.Output.Json
      7 
      8   alias Credo.CLI.Output.UI
      9 
     10   def print(exec, info) do
     11     format_mod = format_mod(exec)
     12 
     13     format_mod.print(exec, info)
     14   end
     15 
     16   def print_help(exec) do
     17     usage = ["Usage: ", :olive, "mix credo info [options]"]
     18 
     19     description = """
     20 
     21     Shows information about Credo and its environment.
     22     """
     23 
     24     example = [
     25       "Example: ",
     26       :olive,
     27       :faint,
     28       "$ mix credo info --format=json --verbose"
     29     ]
     30 
     31     options =
     32       """
     33 
     34       Info options:
     35         -c, --checks                  Only include checks that match the given strings
     36             --checks-with-tag         Only include checks that match the given tag (can be used multiple times)
     37             --checks-without-tag      Ignore checks that match the given tag (can be used multiple times)
     38             --config-file             Use the given config file
     39         -C, --config-name             Use the given config instead of "default"
     40             --enable-disabled-checks  Re-enable disabled checks that match the given strings
     41             --files-included          Only include these files (accepts globs, can be used multiple times)
     42             --files-excluded          Exclude these files (accepts globs, can be used multiple times)
     43             --format                  Display the list in a specific format (json,flycheck,oneline)
     44         -i, --ignore-checks           Ignore checks that match the given strings
     45             --ignore                  Alias for --ignore-checks
     46             --min-priority            Minimum priority to show issues (high,medium,normal,low,lower or number)
     47             --only                    Alias for --checks
     48             --verbose                 Display more information (e.g. checked files)
     49 
     50       General options:
     51         -v, --version                 Show version
     52         -h, --help                    Show this help
     53 
     54       Feedback:
     55         Open an issue here: https://github.com/rrrene/credo/issues
     56       """
     57       |> String.trim_trailing()
     58 
     59     UI.puts()
     60     UI.puts(usage)
     61     UI.puts(description)
     62     UI.puts(example)
     63     UI.puts(options)
     64 
     65     exec
     66   end
     67 end