Skip to content

Commit

Permalink
Fix issue messages for RedundantWithClause
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrene committed Jan 29, 2024
1 parent 61090dc commit 27bff0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/credo/check/refactor/redundant_with_clause_result.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ defmodule Credo.Check.Refactor.RedundantWithClauseResult do

require Logger

@redundant_with "the `with` statement is redundant"
@redundant_clause "the last clause in `with` is redundant"
@redundant_with "`with` statement is redundant"
@redundant_clause "Last clause in `with` is redundant"

@doc false
@impl true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ defmodule Credo.Check.Refactor.RedundantWithClauseResultTest do
|> to_source_file
|> run_check(@described_check)
|> assert_issue(fn issue ->
assert issue.message == "the last clause in `with` is redundant"
assert issue.message == "Last clause in `with` is redundant"
end)
end

Expand All @@ -111,7 +111,7 @@ defmodule Credo.Check.Refactor.RedundantWithClauseResultTest do
|> run_check(@described_check)
|> assert_issue(fn issue ->
assert issue.line_no == 2
assert issue.message == "the last clause in `with` is redundant"
assert issue.message == "Last clause in `with` is redundant"
end)
end

Expand All @@ -127,7 +127,7 @@ defmodule Credo.Check.Refactor.RedundantWithClauseResultTest do
|> run_check(@described_check)
|> assert_issue(fn issue ->
assert issue.line_no == 2
assert issue.message == "the `with` statement is redundant"
assert issue.message == "`with` statement is redundant"
assert issue.trigger == "with"
end)
end
Expand Down

0 comments on commit 27bff0d

Please sign in to comment.