Skip to content

Commit

Permalink
Run mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrene committed Dec 21, 2023
1 parent d7dd030 commit 320ad4b
Show file tree
Hide file tree
Showing 19 changed files with 429 additions and 264 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ defmodule Credo.Check.Consistency.MultiAliasImportRequireUse.Collector do
end

if aliases do
updated_acc = Map.update(acc, current_module, [], fn entries ->
[{directive, aliases, meta[:line]} | entries]
end)
updated_acc =
Map.update(acc, current_module, [], fn entries ->
[{directive, aliases, meta[:line]} | entries]
end)

{ast, {updated_acc, current_module}}
else
{ast, {acc, current_module}}
Expand Down
2 changes: 1 addition & 1 deletion lib/credo/check/readability/predicate_function_names.ex
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule Credo.Check.Readability.PredicateFunctionNames do
{name, meta, nil} ->
issues_for_name(op, name, meta, issues, issue_meta)

{name, meta, [_|_]} ->
{name, meta, [_ | _]} ->
issues_for_name(op, name, meta, issues, issue_meta)

_ ->
Expand Down
2 changes: 1 addition & 1 deletion lib/credo/check/readability/prefer_unquoted_atoms.ex
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ defmodule Credo.Check.Readability.PreferUnquotedAtoms do
end

defp safe_atom_name(token) when is_binary(token) do
':#{token}'
~c":#{token}"
|> :elixir_tokenizer.tokenize(1, [])
|> safe_atom_name(token)
end
Expand Down
5 changes: 4 additions & 1 deletion lib/credo/check/refactor/module_dependencies.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ defmodule Credo.Check.Refactor.ModuleDependencies do

max_deps = Params.get(params, :max_deps, __MODULE__)
dependency_namespaces = Params.get(params, :dependency_namespaces, __MODULE__)
excluded_namespaces = params |> Params.get(:excluded_namespaces, __MODULE__) |> Enum.map(&to_string/1)

excluded_namespaces =
params |> Params.get(:excluded_namespaces, __MODULE__) |> Enum.map(&to_string/1)

excluded_paths = Params.get(params, :excluded_paths, __MODULE__)

case ignore_path?(source_file.filename, excluded_paths) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ defmodule Credo.Check.Warning.MissedMetadataKeyInLoggerConfig do

state = {false, []}

{_, issues} = Credo.Code.prewalk(source_file, &traverse(&1, &2, issue_meta, metadata_keys), state)
{_, issues} =
Credo.Code.prewalk(source_file, &traverse(&1, &2, issue_meta, metadata_keys), state)

issues
end
Expand Down
Loading

0 comments on commit 320ad4b

Please sign in to comment.