diff --git a/lib/credo/check.ex b/lib/credo/check.ex index 87f358dc4..a9d7e27f5 100644 --- a/lib/credo/check.ex +++ b/lib/credo/check.ex @@ -1,9 +1,15 @@ defmodule Credo.Check do - @doc """ + @moduledoc """ `Check` modules represent the checks which are run during the code analysis. + + Example: + + defmodule MyCheck do + use Credo.Check, category: :warning, base_priority: :high, elixir_version: ">= 1.3" + end """ - alias Credo.Priority + @type t :: module @base_category_exit_status_map %{ consistency: 1, @@ -13,8 +19,9 @@ defmodule Credo.Check do warning: 16 } - @type t :: module + alias Credo.Priority + @doc false defmacro __using__(opts) do quote do @behaviour Credo.Check diff --git a/lib/credo/check/code_helper.ex b/lib/credo/check/code_helper.ex index d2d3fe95b..966f3ad7d 100644 --- a/lib/credo/check/code_helper.ex +++ b/lib/credo/check/code_helper.ex @@ -50,6 +50,8 @@ defmodule Credo.Check.CodeHelper do true """ + def matches?(name, value) + def matches?(name, list) when is_list(list) do Enum.any?(list, &matches?(name, &1)) end @@ -69,8 +71,8 @@ defmodule Credo.Check.CodeHelper do Examples: - {:defmodule, "Foo.Bar"} - {:def, "Foo.Bar.baz"} + {:defmodule, "Foo.Bar"} + {:def, "Foo.Bar.baz"} """ def scope_for(source_file, line: line_no) do source_file diff --git a/lib/credo/check/config_comment.ex b/lib/credo/check/config_comment.ex index bc8dd935f..3236f3f82 100644 --- a/lib/credo/check/config_comment.ex +++ b/lib/credo/check/config_comment.ex @@ -1,16 +1,31 @@ defmodule Credo.Check.ConfigComment do - defstruct line_no: nil, - line_no_end: nil, - instruction: nil, - params: nil + @moduledoc """ + `ConfigComment` structs represent comments which follow control Credo's behaviour. - alias Credo.Issue + The following comments are supported: + + # credo:disable-for-this-file + # credo:disable-for-next-line + # credo:disable-for-previous-line + # credo:disable-for-lines: + + """ @instruction_disable_file "disable-for-this-file" @instruction_disable_next_line "disable-for-next-line" @instruction_disable_previous_line "disable-for-previous-line" @instruction_disable_lines "disable-for-lines" + alias Credo.Issue + + defstruct line_no: nil, + line_no_end: nil, + instruction: nil, + params: nil + + @doc "Returns a `ConfigComment` struct based on the given parameters." + def new(instruction, param_string, line_no) + def new("#{@instruction_disable_lines}:" <> line_count, param_string, line_no) do line_count = String.to_integer(line_count) @@ -44,6 +59,9 @@ defmodule Credo.Check.ConfigComment do } end + @doc "Returns `true` if the given `issue` should be ignored based on the given `config_comment`" + def ignores_issue?(config_comment, issue) + def ignores_issue?( %__MODULE__{instruction: @instruction_disable_file, params: params}, %Issue{} = issue @@ -92,6 +110,8 @@ defmodule Credo.Check.ConfigComment do false end + # + defp params_ignore_issue?([], _issue) do true end diff --git a/lib/credo/check/config_comment_finder.ex b/lib/credo/check/config_comment_finder.ex index f13e84e4b..f2f42910b 100644 --- a/lib/credo/check/config_comment_finder.ex +++ b/lib/credo/check/config_comment_finder.ex @@ -1,6 +1,11 @@ defmodule Credo.Check.ConfigCommentFinder do @moduledoc """ + This check is used internally by Credo. + + It traverses the given codebase to find `Credo.Check.ConfigComment` + compatible comments, which control Credo's behaviour. """ + @explanation nil @config_comment_format ~r/#\s*credo\:([\w-\:]+)\s*(.*)/im diff --git a/lib/credo/check/params.ex b/lib/credo/check/params.ex index dec9e6b41..01113880d 100644 --- a/lib/credo/check/params.ex +++ b/lib/credo/check/params.ex @@ -1,5 +1,19 @@ defmodule Credo.Check.Params do - @doc "Returns the given `field`'s params value." + @moduledoc """ + This module provides functions for handling parameters ("params") given to + checks through `.credo.exs` (i.e. the `Credo.ConfigFile`). + """ + + @doc """ + Returns the given `field`'s `params` value. + + Example: + + iex> Credo.Check.Params.get([], :foo, [foo: "bar"]) + "bar" + iex> Credo.Check.Params.get([foo: "baz"], :foo, [foo: "bar"]) + "baz" + """ def get(params, field, default_params \\ []) when is_list(params) do case params[field] do nil -> diff --git a/lib/credo/check/readability/semicolons.ex b/lib/credo/check/readability/semicolons.ex index 54ec48aec..2a6742b5b 100644 --- a/lib/credo/check/readability/semicolons.ex +++ b/lib/credo/check/readability/semicolons.ex @@ -3,6 +3,15 @@ defmodule Credo.Check.Readability.Semicolons do Don't use ; to separate statements and expressions. Statements and expressions should be separated by lines. + # preferred + + a = 1 + b = 2 + + # NOT preferred + + a = 1; b = 2 + Like all `Readability` issues, this one is not a technical concern. But you can improve the odds of others reading and liking your code by making it easier to follow. diff --git a/lib/credo/check/readability/trailing_blank_line.ex b/lib/credo/check/readability/trailing_blank_line.ex index 54b1846d1..4ec129f41 100644 --- a/lib/credo/check/readability/trailing_blank_line.ex +++ b/lib/credo/check/readability/trailing_blank_line.ex @@ -3,7 +3,7 @@ defmodule Credo.Check.Readability.TrailingBlankLine do Files should end in a trailing blank line. This is mostly for historical reasons: every text file should end with a \\n, - or newline since this acts as `eol´ or the end of the line character. + or newline since this acts as `eol` or the end of the line character. See also: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 diff --git a/lib/credo/check/refactor/abc_size.ex b/lib/credo/check/refactor/abc_size.ex index 570543a0a..947194aee 100644 --- a/lib/credo/check/refactor/abc_size.ex +++ b/lib/credo/check/refactor/abc_size.ex @@ -23,11 +23,11 @@ defmodule Credo.Check.Refactor.ABCSize do @branch_ops [:.] @condition_ops [:if, :unless, :for, :try, :case, :cond, :and, :or, :&&, :||] + use Credo.Check + alias Credo.Check.CodeHelper alias Credo.SourceFile - use Credo.Check - @doc false def run(source_file, params \\ []) do issue_meta = IssueMeta.for(source_file, params) diff --git a/lib/credo/check/refactor/cyclomatic_complexity.ex b/lib/credo/check/refactor/cyclomatic_complexity.ex index 496d70408..f1d8be8ab 100644 --- a/lib/credo/check/refactor/cyclomatic_complexity.ex +++ b/lib/credo/check/refactor/cyclomatic_complexity.ex @@ -38,11 +38,11 @@ defmodule Credo.Check.Refactor.CyclomaticComplexity do cond: 1 ] + use Credo.Check + alias Credo.Check.CodeHelper alias Credo.SourceFile - use Credo.Check - @doc false def run(source_file, params \\ []) do issue_meta = IssueMeta.for(source_file, params) diff --git a/lib/credo/check/refactor/function_arity.ex b/lib/credo/check/refactor/function_arity.ex index d63ec777f..6202f65b0 100644 --- a/lib/credo/check/refactor/function_arity.ex +++ b/lib/credo/check/refactor/function_arity.ex @@ -16,10 +16,10 @@ defmodule Credo.Check.Refactor.FunctionArity do @default_params [max_arity: 8, ignore_defp: false] @def_ops [:def, :defp, :defmacro] - alias Credo.Code.Parameters - use Credo.Check + alias Credo.Code.Parameters + @doc false def run(source_file, params \\ []) do issue_meta = IssueMeta.for(source_file, params) diff --git a/lib/credo/check/refactor/nesting.ex b/lib/credo/check/refactor/nesting.ex index d0b4544dd..9414fdacf 100644 --- a/lib/credo/check/refactor/nesting.ex +++ b/lib/credo/check/refactor/nesting.ex @@ -32,10 +32,10 @@ defmodule Credo.Check.Refactor.Nesting do @def_ops [:def, :defp, :defmacro] @nest_ops [:if, :unless, :case, :cond, :fn] - alias Credo.Check.CodeHelper - use Credo.Check + alias Credo.Check.CodeHelper + @doc false def run(source_file, params \\ []) do issue_meta = IssueMeta.for(source_file, params) diff --git a/lib/credo/check/refactor/perceived_complexity.ex b/lib/credo/check/refactor/perceived_complexity.ex index ee090cade..70c78afaa 100644 --- a/lib/credo/check/refactor/perceived_complexity.ex +++ b/lib/credo/check/refactor/perceived_complexity.ex @@ -38,11 +38,11 @@ defmodule Credo.Check.Refactor.PerceivedComplexity do cond: 1 ] + use Credo.Check + alias Credo.Check.CodeHelper alias Credo.SourceFile - use Credo.Check - @doc false def run(source_file, params \\ []) do issue_meta = IssueMeta.for(source_file, params) diff --git a/lib/credo/check/refactor/variable_rebinding.ex b/lib/credo/check/refactor/variable_rebinding.ex index 2b739f635..f376f042e 100644 --- a/lib/credo/check/refactor/variable_rebinding.ex +++ b/lib/credo/check/refactor/variable_rebinding.ex @@ -32,10 +32,10 @@ defmodule Credo.Check.Refactor.VariableRebinding do check: @moduledoc ] - alias Credo.Check.CodeHelper - use Credo.Check + alias Credo.Check.CodeHelper + @doc false def run(source_file, params \\ []) do issue_meta = IssueMeta.for(source_file, params) diff --git a/lib/credo/check/runner.ex b/lib/credo/check/runner.ex index 3e15948f8..5dd842312 100644 --- a/lib/credo/check/runner.ex +++ b/lib/credo/check/runner.ex @@ -1,4 +1,9 @@ defmodule Credo.Check.Runner do + @moduledoc """ + This module is responsible for running checks based on the context represented + by the current `Credo.Execution`. + """ + alias Credo.CLI.Output.UI alias Credo.Execution alias Credo.Execution.Issues @@ -38,7 +43,7 @@ defmodule Credo.Check.Runner do :ok end - @doc "Runs the ConfigCommentFinder" + @doc "Runs the ConfigCommentFinder." def run_config_comment_finder(source_files, exec) do {Credo.Check.ConfigCommentFinder} |> run_check(source_files, exec) diff --git a/lib/credo/cli.ex b/lib/credo/cli.ex index 7aeef2668..91908d075 100644 --- a/lib/credo/cli.ex +++ b/lib/credo/cli.ex @@ -1,6 +1,6 @@ defmodule Credo.CLI do @moduledoc """ - Credo.CLI is the entrypoint for both the Mix task and the escript. + `Credo.CLI` is the entrypoint for both the Mix task and the escript. It takes the parameters passed from the command line and translates them into a Command module (see the `Credo.CLI.Command` namespace), the work directory diff --git a/lib/credo/cli/filename.ex b/lib/credo/cli/filename.ex index 8d4e7925e..cee6c2ddc 100644 --- a/lib/credo/cli/filename.ex +++ b/lib/credo/cli/filename.ex @@ -1,5 +1,7 @@ defmodule Credo.CLI.Filename do - @moduledoc false + @moduledoc """ + This module can be used to handle filenames given at the command line. + """ @doc """ Returns `true` if a given `filename` contains a pos_suffix. diff --git a/lib/credo/cli/options.ex b/lib/credo/cli/options.ex index ff6a1c3a5..c045f20de 100644 --- a/lib/credo/cli/options.ex +++ b/lib/credo/cli/options.ex @@ -1,10 +1,7 @@ defmodule Credo.CLI.Options do - defstruct command: nil, - path: nil, - args: [], - switches: nil, - unknown_switches: [], - unknown_args: [] + @moduledoc """ + The `Options` struct represents the options given on the command line. + """ @switches [ all_priorities: :boolean, @@ -39,6 +36,20 @@ defmodule Credo.CLI.Options do alias Credo.Priority + defstruct command: nil, + path: nil, + args: [], + switches: nil, + unknown_switches: [], + unknown_args: [] + + @doc """ + Returns a `Options` struct for the given parameters. + + iex> Credo.CLI.Options.parse(["alice", "--debug"], ".", ["alice", "bob", "eve"], []) + %Credo.CLI.Options{args: [], command: "alice", path: ".", switches: %{debug: true}, unknown_args: [], unknown_switches: []} + + """ def parse(argv, current_dir, command_names, ignored_args) do argv |> OptionParser.parse(strict: @switches, aliases: @aliases) diff --git a/lib/credo/cli/output.ex b/lib/credo/cli/output.ex index 251323f4e..a5b11047e 100644 --- a/lib/credo/cli/output.ex +++ b/lib/credo/cli/output.ex @@ -1,9 +1,13 @@ defmodule Credo.CLI.Output do - alias Credo.CLI.Output.UI - alias Credo.Execution + @moduledoc """ + This module provides helper functions regarding command line output. + """ @category_tag_map %{"refactor" => "F"} + alias Credo.CLI.Output.UI + alias Credo.Execution + def check_tag(category, in_parens \\ true) def check_tag(category, in_parens) when is_binary(category) do diff --git a/lib/credo/cli/output/format_delegator.ex b/lib/credo/cli/output/format_delegator.ex index cd7f5df1e..9b6190ffd 100644 --- a/lib/credo/cli/output/format_delegator.ex +++ b/lib/credo/cli/output/format_delegator.ex @@ -1,9 +1,19 @@ defmodule Credo.CLI.Output.FormatDelegator do @moduledoc """ - The FormatDelegator module can be used to easily delegate print-statements - for different formats to different modules. + This module can be used to easily delegate print-statements for different + formats to different modules. + + Example: + + use Credo.CLI.Output.FormatDelegator, + default: Credo.CLI.Command.Suggest.Output.Default, + flycheck: Credo.CLI.Command.Suggest.Output.FlyCheck, + oneline: Credo.CLI.Command.Suggest.Output.Oneline, + json: Credo.CLI.Command.Suggest.Output.Json + """ + @doc false defmacro __using__(format_list) do format_mods = Enum.map(format_list, fn {format, output_mod} -> diff --git a/lib/credo/cli/output/shell.ex b/lib/credo/cli/output/shell.ex index e3e45cc29..2492bf4bb 100644 --- a/lib/credo/cli/output/shell.ex +++ b/lib/credo/cli/output/shell.ex @@ -1,7 +1,8 @@ defmodule Credo.CLI.Output.Shell do @moduledoc """ - GenServer used by Credo.CLI.Output.UI to write to the shell. + This module is used by `Credo.CLI.Output.UI` to write to the shell. """ + use GenServer def start_link(opts \\ []) do diff --git a/lib/credo/cli/output/summary.ex b/lib/credo/cli/output/summary.ex index 998611485..9f381bec6 100644 --- a/lib/credo/cli/output/summary.ex +++ b/lib/credo/cli/output/summary.ex @@ -1,8 +1,7 @@ defmodule Credo.CLI.Output.Summary do - alias Credo.CLI.Output - alias Credo.CLI.Output.UI - alias Credo.Execution - alias Credo.SourceFile + @moduledoc """ + This module is responsible for printing the summary at the end of the analysis. + """ @category_wording [ {:consistency, "consistency issue", "consistency issues"}, @@ -13,6 +12,11 @@ defmodule Credo.CLI.Output.Summary do ] @cry_for_help "Please report incorrect results: https://github.com/rrrene/credo/issues" + alias Credo.CLI.Output + alias Credo.CLI.Output.UI + alias Credo.Execution + alias Credo.SourceFile + def print( _source_files, %Execution{format: "flycheck"}, diff --git a/lib/credo/cli/output/ui.ex b/lib/credo/cli/output/ui.ex index 28f805425..a02804908 100644 --- a/lib/credo/cli/output/ui.ex +++ b/lib/credo/cli/output/ui.ex @@ -1,4 +1,8 @@ defmodule Credo.CLI.Output.UI do + @moduledoc """ + This module provides functions used to create the UI. + """ + @edge "┃" @ellipsis "…" @shell_service Credo.CLI.Output.Shell diff --git a/lib/credo/code/scope.ex b/lib/credo/code/scope.ex index 07a23c811..a04e9e821 100644 --- a/lib/credo/code/scope.ex +++ b/lib/credo/code/scope.ex @@ -31,8 +31,8 @@ defmodule Credo.Code.Scope do Examples: - {:defmodule, "Foo.Bar"} - {:def, "Foo.Bar.baz"} + {:defmodule, "Foo.Bar"} + {:def, "Foo.Bar.baz"} """ def name(_ast, line: 0), do: nil diff --git a/lib/credo/config_file.ex b/lib/credo/config_file.ex index 8c5b7c89b..9a3d05fa5 100644 --- a/lib/credo/config_file.ex +++ b/lib/credo/config_file.ex @@ -3,14 +3,6 @@ defmodule Credo.ConfigFile do `ConfigFile` structs represent all loaded and merged config files in a run. """ - defstruct files: nil, - color: true, - checks: nil, - requires: [], - strict: false, - # checks if there is a new version of Credo - check_for_updates: true - @config_filename ".credo.exs" @default_config_name "default" @default_config_file File.read!(@config_filename) @@ -19,6 +11,14 @@ defmodule Credo.ConfigFile do @default_files_included [@default_glob] @default_files_excluded [] + defstruct files: nil, + color: true, + checks: nil, + requires: [], + strict: false, + # checks if there is a new version of Credo + check_for_updates: true + @doc """ Returns Execution struct representing a consolidated Execution for all `.credo.exs` files in `relevant_directories/1` merged into the default configuration. diff --git a/lib/credo/execution.ex b/lib/credo/execution.ex index a37e82a31..ef7fb659f 100644 --- a/lib/credo/execution.ex +++ b/lib/credo/execution.ex @@ -4,6 +4,11 @@ defmodule Credo.Execution do manipulated via the `Credo.Execution` module. """ + @type t :: module + + alias Credo.Execution.Issues + alias Credo.Execution.SourceFiles + defstruct argv: [], cli_options: nil, @@ -39,11 +44,6 @@ defmodule Credo.Execution do results: %{}, config_comment_map: %{} - @type t :: module - - alias Credo.Execution.Issues - alias Credo.Execution.SourceFiles - @doc """ Returns the checks that should be run for a given `exec` struct. diff --git a/lib/credo/issue.ex b/lib/credo/issue.ex index 2aedf9cc6..6de3067c6 100644 --- a/lib/credo/issue.ex +++ b/lib/credo/issue.ex @@ -3,6 +3,8 @@ defmodule Credo.Issue do `Issue` structs represent all issues found during the code analysis. """ + @type t :: module + defstruct check: nil, category: nil, priority: 0, @@ -19,6 +21,4 @@ defmodule Credo.Issue do # optional: the name of the module, macro or # function where the issue was found scope: nil - - @type t :: module end diff --git a/lib/credo/source_file.ex b/lib/credo/source_file.ex index 380f6ec6c..b349d9183 100644 --- a/lib/credo/source_file.ex +++ b/lib/credo/source_file.ex @@ -1,6 +1,7 @@ defmodule Credo.SourceFile do - defstruct filename: nil, - valid?: nil + @moduledoc """ + `SourceFile` structs represent a source file in the codebase. + """ @type t :: module @@ -8,6 +9,18 @@ defmodule Credo.SourceFile do alias Credo.Service.SourceFileLines alias Credo.Service.SourceFileSource + defstruct filename: nil, + valid?: nil + + defimpl Inspect, for: __MODULE__ do + def inspect(source_file, _opts) do + "%SourceFile<#{source_file.filename}>" + end + end + + @doc """ + Retuns a `SourceFile` struct for the given `source` code and `filename`. + """ def parse(source, filename) do filename = Path.relative_to_cwd(filename) lines = Credo.Code.to_lines(source) @@ -31,6 +44,9 @@ defmodule Credo.SourceFile do } end + @doc "Retuns the AST for the given `source_file`." + def ast(source_file) + def ast(%__MODULE__{filename: filename}) do case SourceFileAST.get(filename) do {:ok, ast} -> @@ -41,6 +57,9 @@ defmodule Credo.SourceFile do end end + @doc "Retuns the lines of source code for the given `source_file`." + def lines(source_file) + def lines(%__MODULE__{filename: filename}) do case SourceFileLines.get(filename) do {:ok, lines} -> @@ -51,6 +70,9 @@ defmodule Credo.SourceFile do end end + @doc "Retuns the source code for the given `source_file`." + def source(source_file) + def source(%__MODULE__{filename: filename}) do case SourceFileSource.get(filename) do {:ok, source} -> @@ -91,6 +113,8 @@ defmodule Credo.SourceFile do NOTE: Both +line_no+ and the returned index are 1-based. """ + def column(source_file, line_no, trigger) + def column(%__MODULE__{} = source_file, line_no, trigger) when is_binary(trigger) or is_atom(trigger) do line = line_at(source_file, line_no) @@ -111,10 +135,4 @@ defmodule Credo.SourceFile do end def column(_, _, _), do: nil - - defimpl Inspect, for: __MODULE__ do - def inspect(source_file, _opts) do - "%SourceFile<#{source_file.filename}>" - end - end end diff --git a/mix.exs b/mix.exs index 538a42a6e..0b8d3c2c4 100644 --- a/mix.exs +++ b/mix.exs @@ -44,7 +44,8 @@ defmodule Credo.Mixfile do [ {:bunt, "~> 0.2.0"}, {:jason, "~> 1.0"}, - {:ex_doc, "~> 0.16", only: :dev, runtime: false} + {:ex_doc, "~> 0.16", only: :dev, runtime: false}, + {:inch_ex, "~> 0.1", only: [:dev, :test], runtime: false} ] end end diff --git a/mix.lock b/mix.lock index 985ff9ba4..bffb6f4f8 100644 --- a/mix.lock +++ b/mix.lock @@ -2,5 +2,7 @@ "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], []}, "earmark": {:hex, :earmark, "1.2.4", "99b637c62a4d65a20a9fb674b8cffb8baa771c04605a80c911c4418c69b75439", [:mix], [], "hexpm"}, "ex_doc": {:hex, :ex_doc, "0.18.3", "f4b0e4a2ec6f333dccf761838a4b253d75e11f714b85ae271c9ae361367897b7", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}, + "inch_ex": {:hex, :inch_ex, "0.5.6", "418357418a553baa6d04eccd1b44171936817db61f4c0840112b420b8e378e67", [:mix], [{:poison, "~> 1.5 or ~> 2.0 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"}, "jason": {:hex, :jason, "1.0.0", "0f7cfa9bdb23fed721ec05419bcee2b2c21a77e926bce0deda029b5adc716fe2", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"}, + "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm"}, } diff --git a/test/credo/check/config_comment_finder_test.exs b/test/credo/check/config_comment_finder_test.exs index 48500d476..657e04f87 100644 --- a/test/credo/check/config_comment_finder_test.exs +++ b/test/credo/check/config_comment_finder_test.exs @@ -1,8 +1,6 @@ defmodule Credo.Check.ConfigCommentFinderTest do use Credo.TestHelper - use Credo.TestHelper - alias Credo.Check.ConfigCommentFinder test "it should report the correct scope" do diff --git a/test/credo/check/params_test.exs b/test/credo/check/params_test.exs new file mode 100644 index 000000000..c0234c62c --- /dev/null +++ b/test/credo/check/params_test.exs @@ -0,0 +1,5 @@ +defmodule Credo.Check.ParamsTest do + use Credo.TestHelper + + doctest Credo.Check.Params +end diff --git a/test/credo/cli/options_test.exs b/test/credo/cli/options_test.exs index 2c21548e1..ba141f74d 100644 --- a/test/credo/cli/options_test.exs +++ b/test/credo/cli/options_test.exs @@ -5,6 +5,8 @@ defmodule Credo.CLI.OptionsTest do @command_names ["cmd1", "cmd2", "cmd3"] @fixture_name "options" + doctest Credo.CLI.Options + defp fixture_path(name) do Path.join([File.cwd!(), "test", "fixtures", name]) end