Skip to content

Commit

Permalink
Remove variable name clause for check that can't compile
Browse files Browse the repository at this point in the history
  • Loading branch information
novaugust committed Jan 17, 2024
1 parent acda01c commit a10e85e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
8 changes: 0 additions & 8 deletions lib/credo/check/readability/variable_names.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ defmodule Credo.Check.Readability.VariableNames do
{ast, issues_for_lhs(lhs, issues, issue_meta)}
end

defp traverse(
{:<-, _meta, [{:|, _comp_meta, [_lhs, rhs]}, _comp_rhs]} = ast,
issues,
issue_meta
) do
{ast, issues_for_lhs(rhs, issues, issue_meta)}
end

defp traverse({:<-, _meta, [lhs, _rhs]} = ast, issues, issue_meta) do
{ast, issues_for_lhs(lhs, issues, issue_meta)}
end
Expand Down
13 changes: 0 additions & 13 deletions test/credo/check/readability/variable_names_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,6 @@ defmodule Credo.Check.Readability.VariableNamesTest do
|> assert_issue()
end

test "it should report a violation /10" do
"""
defmodule CredoSampleModule do
def some_function(param, p2, p3) do
[someValue + v2 + v3 | {someValue} <- param, v2 <- p2, v3 <- p3]
end
end
"""
|> to_source_file
|> run_check(@described_check)
|> assert_issue()
end

test "it should report a violation /11" do
"""
defmodule CredoSampleModule do
Expand Down

0 comments on commit a10e85e

Please sign in to comment.