Skip to content

Commit

Permalink
Mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrene committed Feb 14, 2024
1 parent e37af7a commit cbcdb74
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion lib/credo/check/readability/with_custom_tagged_tuple.ex
Expand Up @@ -75,7 +75,8 @@ defmodule Credo.Check.Readability.WithCustomTaggedTuple do
defp issue_for(error, issue_meta) do
format_issue(
issue_meta,
message: "Avoid using tagged tuples as placeholders in `with` (found: `#{inspect(error.tuple_tag)}`).",
message:
"Avoid using tagged tuples as placeholders in `with` (found: `#{inspect(error.tuple_tag)}`).",
line_no: error.line,
trigger: inspect(error.tuple_tag)
)
Expand Down
3 changes: 2 additions & 1 deletion lib/credo/check/refactor/append_single_item.ex
Expand Up @@ -48,7 +48,8 @@ defmodule Credo.Check.Refactor.AppendSingleItem do
defp issue_for(issue_meta, line_no, trigger) do
format_issue(
issue_meta,
message: "Appending a single item to a list is inefficient, use `[head | tail]` notation (and `Enum.reverse/1` when order matters).",
message:
"Appending a single item to a list is inefficient, use `[head | tail]` notation (and `Enum.reverse/1` when order matters).",
trigger: trigger,
line_no: line_no
)
Expand Down
3 changes: 2 additions & 1 deletion lib/credo/check/warning/map_get_unsafe_pass.ex
Expand Up @@ -83,7 +83,8 @@ defmodule Credo.Check.Warning.MapGetUnsafePass do
defp issue_for(issue_meta, line_no, trigger) do
format_issue(
issue_meta,
message: "`Map.get` with no default return value is potentially unsafe in pipes, use `Map.get/3` instead.",
message:
"`Map.get` with no default return value is potentially unsafe in pipes, use `Map.get/3` instead.",
trigger: trigger,
line_no: line_no
)
Expand Down
Expand Up @@ -45,10 +45,14 @@ defmodule Credo.Check.Readability.WithCustomTaggedTupleTest do
|> assert_issues(fn issues ->
[issue1, issue2] = issues

assert issue1.message == "Avoid using tagged tuples as placeholders in `with` (found: `:resource`)."
assert issue1.message ==
"Avoid using tagged tuples as placeholders in `with` (found: `:resource`)."

assert issue1.trigger == ":resource"

assert issue2.message == "Avoid using tagged tuples as placeholders in `with` (found: `:authz`)."
assert issue2.message ==
"Avoid using tagged tuples as placeholders in `with` (found: `:authz`)."

assert issue2.trigger == ":authz"
end)
end
Expand Down
2 changes: 1 addition & 1 deletion test/regression/run_older_credo_version.exs
@@ -1,4 +1,4 @@
[credo_version|rest] = System.argv()
[credo_version | rest] = System.argv()

Mix.install([
{:credo, credo_version}
Expand Down

0 comments on commit cbcdb74

Please sign in to comment.