rrrene / credo

A static code analysis tool for the Elixir language with a focus on code consistency and teaching.
http://credo-ci.org/
MIT License
4.91k stars 414 forks source link

Error `mix credo` on Elixir 1.17 and Erlang/OTP 27 #1139

Closed zacky1972 closed 2 months ago

zacky1972 commented 2 months ago

Precheck

Environment

Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]

Elixir 1.17.0 (compiled with Erlang/OTP 27)

What were you trying to do?

  1. mix new credo_test
  2. cd credo_test
  3. Add the following deps to mix.exs
  4. mix deps.get
  5. mix credo
{:credo, "~> 1.7", only: [:dev, :test], runtime: false}

Expected outcome

No error when mix credo

Actual outcome

I got the following error:

==> credo
Compiling 253 files (.ex)
warning: x..y inside match is deprecated, you must always match on the step: x..y//var or x..y//_ if you want to ignore it
  lib/credo/backports.ex:4: Credo.Backports.Enum.slice/2

warning: x..y inside match is deprecated, you must always match on the step: x..y//var or x..y//_ if you want to ignore it
  lib/credo/backports.ex:16: Credo.Backports.String.slice/2

warning: 0..-2 has a default step of -1, please write 0..-2//-1 instead
  lib/credo/cli/command/explain/output/default.ex:272: Credo.CLI.Command.Explain.Output.Default.print_check_explanation/2

warning: 1..-1 has a default step of -1, please write 1..-1//-1 instead
  lib/credo/cli/command/diff/task/get_git_diff.ex:107: Credo.CLI.Command.Diff.Task.GetGitDiff.run_credo_on_dir/4

warning: 1..-2 has a default step of -1, please write 1..-2//-1 instead
  lib/credo/cli/command/diff/task/get_git_diff.ex:109: Credo.CLI.Command.Diff.Task.GetGitDiff.run_credo_on_dir/4

warning: 1..-2 has a default step of -1, please write 1..-2//-1 instead
  lib/credo/cli/command/diff/task/get_git_diff.ex:110: Credo.CLI.Command.Diff.Task.GetGitDiff.run_credo_on_dir/4

warning: 1..-2 has a default step of -1, please write 1..-2//-1 instead
  lib/credo/cli/command/diff/task/get_git_diff.ex:111: Credo.CLI.Command.Diff.Task.GetGitDiff.run_credo_on_dir/4

warning: 1..-2 has a default step of -1, please write 1..-2//-1 instead
  lib/credo/cli/command/diff/task/get_git_diff.ex:112: Credo.CLI.Command.Diff.Task.GetGitDiff.run_credo_on_dir/4

warning: 1..-2 has a default step of -1, please write 1..-2//-1 instead
  lib/credo/cli/command/diff/task/get_git_diff.ex:113: Credo.CLI.Command.Diff.Task.GetGitDiff.run_credo_on_dir/4

warning: 1..-2 has a default step of -1, please write 1..-2//-1 instead
  lib/credo/check/config_comment.ex:138: Credo.Check.ConfigComment.value_for/1

warning: 0..-2 has a default step of -1, please write 0..-2//-1 instead
  lib/credo/check/warning/unused_function_return_helper.ex:135: Credo.Check.Warning.UnusedFunctionReturnHelper.verify_candidate/3

warning: 0..-2 has a default step of -1, please write 0..-2//-1 instead
  lib/credo/check/warning/unused_function_return_helper.ex:135: Credo.Check.Warning.UnusedFunctionReturnHelper.verify_candidate/3

warning: 0..-2 has a default step of -1, please write 0..-2//-1 instead
  lib/credo/check/warning/unused_function_return_helper.ex:135: Credo.Check.Warning.UnusedFunctionReturnHelper.verify_candidate/3

warning: 0..-2 has a default step of -1, please write 0..-2//-1 instead
  lib/credo/check/warning/unused_function_return_helper.ex:135: Credo.Check.Warning.UnusedFunctionReturnHelper.verify_candidate/3

warning: 0..-2 has a default step of -1, please write 0..-2//-1 instead
  lib/credo/check/warning/unused_function_return_helper.ex:135: Credo.Check.Warning.UnusedFunctionReturnHelper.verify_candidate/3

warning: 0..-2 has a default step of -1, please write 0..-2//-1 instead
  lib/credo/check/consistency/multi_alias_import_require_use/collector.ex:45: Credo.Check.Consistency.MultiAliasImportRequireUse.Collector.traverse/2

Generated credo app
Checking 3 source files ...
Error while running Elixir.Credo.Check.Readability.SpaceAfterCommas on test/test_helper.exs
Error while running Elixir.Credo.Check.Readability.SpaceAfterCommas on lib/credo_test.ex
Error while running Elixir.Credo.Check.Readability.LargeNumbers on test/test_helper.exs
Error while running Elixir.Credo.Check.Readability.LargeNumbers on test/credo_test_test.exs
Error while running Elixir.Credo.Check.Readability.SpaceAfterCommas on test/credo_test_test.exs
Error while running Elixir.Credo.Check.Readability.Semicolons on lib/credo_test.ex
Error while running Elixir.Credo.Check.Readability.ParenthesesInCondition on lib/credo_test.ex
Error while running Elixir.Credo.Check.Readability.Semicolons on test/credo_test_test.exs
Error while running Elixir.Credo.Check.Readability.Semicolons on test/test_helper.exs
Error while running Elixir.Credo.Check.Readability.ParenthesesInCondition on test/test_helper.exs
Error while running Elixir.Credo.Check.Readability.LargeNumbers on lib/credo_test.ex
Error while running Elixir.Credo.Check.Readability.ParenthesesInCondition on test/credo_test_test.exs

20:00:38.871 [error] Task #PID<0.2092.0> started from #PID<0.2070.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 2, 1, [], [{:eol, {1, 15, 1}}, {:")", {1, 14, nil}}, {:"(", {1, 13, nil}}, {:paren_identifier, {1, 8, ~c"start"}, :start}, {:., {1, 7, nil}}, {:alias, {1, 1, ~c"ExUnit"}, :ExUnit}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/check/consistency/space_around_operators/collector.ex:17: Credo.Check.Consistency.SpaceAroundOperators.Collector.collect_matches/2
    (credo 1.7.6) lib/credo/check/consistency/collector.ex:158: anonymous fn/3 in Credo.Check.Consistency.Collector.find_issues/5
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.17.0) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: &:erlang.apply/2
    Args: [#Function<0.62605471/1 in Credo.Check.Consistency.Collector.find_issues/5>, [%SourceFile<test/test_helper.exs>]]

20:00:38.876 [error] Task #PID<0.2155.0> started from #PID<0.2124.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 2, 1, [], [{:eol, {1, 15, 1}}, {:")", {1, 14, nil}}, {:"(", {1, 13, nil}}, {:paren_identifier, {1, 8, ~c"start"}, :start}, {:., {1, 7, nil}}, {:alias, {1, 1, ~c"ExUnit"}, :ExUnit}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/check/readability/semicolons.ex:32: Credo.Check.Readability.Semicolons.run/2
    (credo 1.7.6) lib/credo/check/readability/semicolons.ex:2: Credo.Check.Readability.Semicolons.do_run_on_source_file/3
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.17.0) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: &:erlang.apply/2
    Args: [#Function<0.56589885/1 in Credo.Check.Readability.Semicolons.do_run_on_all_source_files/3>, [%SourceFile<test/test_helper.exs>]]

20:00:38.876 [error] Task #PID<0.2146.0> started from #PID<0.2124.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 19, 1, [], [{:eol, {18, 4, 1}}, {:end, {18, 1, nil}}, {:eol, {17, 6, 1}}, {:end, {17, 3, nil}}, {:eol, {16, 11, 1}}, {:atom, {16, 5, ~c"world"}, :world}, {:eol, {15, 15, 1}}, {:do, {15, 13, nil}}, {:do_identifier, {15, 7, ~c"hello"}, :hello}, {:identifier, {15, 3, ~c"def"}, :def}, {:eol, {14, 6, 1}}, {:bin_heredoc, {6, 8, nil}, 2, ["Hello world.\n\n## Examples\n\n    iex> CredoTest.hello()\n    :world\n\n"]}, {:identifier, {6, 4, ~c"doc"}, :doc}, {:at_op, {6, 3, nil}, :@}, {:eol, {4, 6, 2}}, {:bin_heredoc, {2, 14, nil}, 2, ["Documentation for `CredoTest`.\n"]}, {:identifier, {2, 4, ~c"moduledoc"}, :moduledoc}, {:at_op, {2, 3, nil}, :@}, {:eol, {1, 23, 1}}, {:do, {1, 21, nil}}, {:alias, {1, 11, ~c"CredoTest"}, :CredoTest}, {:identifier, {1, 1, ~c"defmodule"}, :defmodule}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/check/readability/semicolons.ex:32: Credo.Check.Readability.Semicolons.run/2
    (credo 1.7.6) lib/credo/check/readability/semicolons.ex:2: Credo.Check.Readability.Semicolons.do_run_on_source_file/3
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.17.0) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: &:erlang.apply/2
    Args: [#Function<0.56589885/1 in Credo.Check.Readability.Semicolons.do_run_on_all_source_files/3>, [%SourceFile<lib/credo_test.ex>]]
** (EXIT from #PID<0.94.0>) an exception was raised:
    ** (CaseClauseError) no case clause matching: {:ok, 2, 1, [], [{:eol, {1, 15, 1}}, {:")", {1, 14, nil}}, {:"(", {1, 13, nil}}, {:paren_identifier, {1, 8, ~c"start"}, :start}, {:., {1, 7, nil}}, {:alias, {1, 1, ~c"ExUnit"}, :ExUnit}], []}
        (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
        (credo 1.7.6) lib/credo/check/readability/large_numbers.ex:43: Credo.Check.Readability.LargeNumbers.run/2
        (credo 1.7.6) lib/credo/check/readability/large_numbers.ex:2: Credo.Check.Readability.LargeNumbers.do_run_on_source_file/3
        (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
        (elixir 1.17.0) lib/task/supervised.ex:36: Task.Supervised.reply/4

20:00:38.876 [error] Task #PID<0.2123.0> started from #PID<0.2101.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 2, 1, [], [{:eol, {1, 15, 1}}, {:")", {1, 14, nil}}, {:"(", {1, 13, nil}}, {:paren_identifier, {1, 8, ~c"start"}, :start}, {:., {1, 7, nil}}, {:alias, {1, 1, ~c"ExUnit"}, :ExUnit}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/check/readability/large_numbers.ex:43: Credo.Check.Readability.LargeNumbers.run/2
    (credo 1.7.6) lib/credo/check/readability/large_numbers.ex:2: Credo.Check.Readability.LargeNumbers.do_run_on_source_file/3
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.17.0) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: &:erlang.apply/2
    Args: [#Function<2.75132833/1 in Credo.Check.Readability.LargeNumbers.do_run_on_all_source_files/3>, [%SourceFile<test/test_helper.exs>]]

20:00:38.871 [error] Task #PID<0.2087.0> started from #PID<0.2074.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 19, 1, [], [{:eol, {18, 4, 1}}, {:end, {18, 1, nil}}, {:eol, {17, 6, 1}}, {:end, {17, 3, nil}}, {:eol, {16, 11, 1}}, {:atom, {16, 5, ~c"world"}, :world}, {:eol, {15, 15, 1}}, {:do, {15, 13, nil}}, {:do_identifier, {15, 7, ~c"hello"}, :hello}, {:identifier, {15, 3, ~c"def"}, :def}, {:eol, {14, 6, 1}}, {:bin_heredoc, {6, 8, nil}, 2, ["Hello world.\n\n## Examples\n\n    iex> CredoTest.hello()\n    :world\n\n"]}, {:identifier, {6, 4, ~c"doc"}, :doc}, {:at_op, {6, 3, nil}, :@}, {:eol, {4, 6, 2}}, {:bin_heredoc, {2, 14, nil}, 2, ["Documentation for `CredoTest`.\n"]}, {:identifier, {2, 4, ~c"moduledoc"}, :moduledoc}, {:at_op, {2, 3, nil}, :@}, {:eol, {1, 23, 1}}, {:do, {1, 21, nil}}, {:alias, {1, 11, ~c"CredoTest"}, :CredoTest}, {:identifier, {1, 1, ~c"defmodule"}, :defmodule}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/code/interpolation_helper.ex:68: Credo.Code.InterpolationHelper.interpolation_positions/2
    (credo 1.7.6) lib/credo/code/interpolation_helper.ex:9: Credo.Code.InterpolationHelper.replace_interpolations/3
    (credo 1.7.6) lib/credo/code/heredocs.ex:70: Credo.Code.Heredocs.replace_with_spaces/5
    (credo 1.7.6) lib/credo/code.ex:190: Credo.Code.clean_charlists_strings_sigils_and_comments/2
    (credo 1.7.6) lib/credo/check/consistency/space_in_parentheses/collector.ex:14: Credo.Check.Consistency.SpaceInParentheses.Collector.collect_matches/2
    (credo 1.7.6) lib/credo/check/consistency/collector.ex:158: anonymous fn/3 in Credo.Check.Consistency.Collector.find_issues/5
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
Function: &:erlang.apply/2
    Args: [#Function<0.62605471/1 in Credo.Check.Consistency.Collector.find_issues/5>, [%SourceFile<lib/credo_test.ex>]]

20:00:38.871 [error] Task #PID<0.2097.0> started from #PID<0.2074.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 9, 1, [], [{:eol, {8, 4, 1}}, {:end, {8, 1, nil}}, {:eol, {7, 6, 1}}, {:end, {7, 3, nil}}, {:eol, {6, 39, 1}}, {:atom, {6, 33, ~c"world"}, :world}, {:comp_op, {6, 30, nil}, :==}, {:")", {6, 28, nil}}, {:"(", {6, 27, nil}}, {:paren_identifier, {6, 22, ~c"hello"}, :hello}, {:., {6, 21, nil}}, {:alias, {6, 12, ~c"CredoTest"}, :CredoTest}, {:identifier, {6, 5, ~c"assert"}, :assert}, {:eol, {5, 29, 1}}, {:do, {5, 27, nil}}, {:bin_string, {5, 8, nil}, ["greets the world"]}, {:identifier, {5, 3, ~c"test"}, :test}, {:eol, {3, 20, 2}}, {:alias, {3, 11, ~c"CredoTest"}, :CredoTest}, {:identifier, {3, 3, ~c"doctest"}, :doctest}, {:eol, {2, 18, 1}}, {:alias, {2, 14, ~c"Case"}, :Case}, {:., {2, 13, nil}}, {:alias, {2, 7, ~c"ExUnit"}, :ExUnit}, {:identifier, {2, 3, ~c"use"}, :use}, {:eol, {1, 27, 1}}, {:do, {1, 25, nil}}, {:alias, {1, 11, ~c"CredoTestTest"}, :CredoTestTest}, {:identifier, {1, 1, ~c"defmodule"}, :defmodule}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/code/interpolation_helper.ex:68: Credo.Code.InterpolationHelper.interpolation_positions/2
    (credo 1.7.6) lib/credo/code/interpolation_helper.ex:9: Credo.Code.InterpolationHelper.replace_interpolations/3
    (credo 1.7.6) lib/credo/code/heredocs.ex:70: Credo.Code.Heredocs.replace_with_spaces/5
    (credo 1.7.6) lib/credo/code.ex:190: Credo.Code.clean_charlists_strings_sigils_and_comments/2
    (credo 1.7.6) lib/credo/check/consistency/space_in_parentheses/collector.ex:14: Credo.Check.Consistency.SpaceInParentheses.Collector.collect_matches/2
    (credo 1.7.6) lib/credo/check/consistency/collector.ex:158: anonymous fn/3 in Credo.Check.Consistency.Collector.find_issues/5
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
Function: &:erlang.apply/2
    Args: [#Function<0.62605471/1 in Credo.Check.Consistency.Collector.find_issues/5>, [%SourceFile<test/credo_test_test.exs>]]

20:00:38.871 [error] Task #PID<0.2106.0> started from #PID<0.2074.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 2, 1, [], [{:eol, {1, 15, 1}}, {:")", {1, 14, nil}}, {:"(", {1, 13, nil}}, {:paren_identifier, {1, 8, ~c"start"}, :start}, {:., {1, 7, nil}}, {:alias, {1, 1, ~c"ExUnit"}, :ExUnit}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/code/interpolation_helper.ex:68: Credo.Code.InterpolationHelper.interpolation_positions/2
    (credo 1.7.6) lib/credo/code/interpolation_helper.ex:9: Credo.Code.InterpolationHelper.replace_interpolations/3
    (credo 1.7.6) lib/credo/code/heredocs.ex:70: Credo.Code.Heredocs.replace_with_spaces/5
    (credo 1.7.6) lib/credo/code.ex:190: Credo.Code.clean_charlists_strings_sigils_and_comments/2
    (credo 1.7.6) lib/credo/check/consistency/space_in_parentheses/collector.ex:14: Credo.Check.Consistency.SpaceInParentheses.Collector.collect_matches/2
    (credo 1.7.6) lib/credo/check/consistency/collector.ex:158: anonymous fn/3 in Credo.Check.Consistency.Collector.find_issues/5
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
Function: &:erlang.apply/2
    Args: [#Function<0.62605471/1 in Credo.Check.Consistency.Collector.find_issues/5>, [%SourceFile<test/test_helper.exs>]]

20:00:38.876 [error] Task #PID<0.2151.0> started from #PID<0.2133.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 19, 1, [], [{:eol, {18, 4, 1}}, {:end, {18, 1, nil}}, {:eol, {17, 6, 1}}, {:end, {17, 3, nil}}, {:eol, {16, 11, 1}}, {:atom, {16, 5, ~c"world"}, :world}, {:eol, {15, 15, 1}}, {:do, {15, 13, nil}}, {:do_identifier, {15, 7, ~c"hello"}, :hello}, {:identifier, {15, 3, ~c"def"}, :def}, {:eol, {14, 6, 1}}, {:bin_heredoc, {6, 8, nil}, 2, ["Hello world.\n\n## Examples\n\n    iex> CredoTest.hello()\n    :world\n\n"]}, {:identifier, {6, 4, ~c"doc"}, :doc}, {:at_op, {6, 3, nil}, :@}, {:eol, {4, 6, 2}}, {:bin_heredoc, {2, 14, nil}, 2, ["Documentation for `CredoTest`.\n"]}, {:identifier, {2, 4, ~c"moduledoc"}, :moduledoc}, {:at_op, {2, 3, nil}, :@}, {:eol, {1, 23, 1}}, {:do, {1, 21, nil}}, {:alias, {1, 11, ~c"CredoTest"}, :CredoTest}, {:identifier, {1, 1, ~c"defmodule"}, :defmodule}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/code/interpolation_helper.ex:68: Credo.Code.InterpolationHelper.interpolation_positions/2
    (credo 1.7.6) lib/credo/code/interpolation_helper.ex:9: Credo.Code.InterpolationHelper.replace_interpolations/3
    (credo 1.7.6) lib/credo/code/sigils.ex:81: Credo.Code.Sigils.replace_with_spaces/5
    (credo 1.7.6) lib/credo/check/readability/space_after_commas.ex:49: Credo.Check.Readability.SpaceAfterCommas.run/2
    (credo 1.7.6) lib/credo/check/readability/space_after_commas.ex:2: Credo.Check.Readability.SpaceAfterCommas.do_run_on_source_file/3
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.17.0) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: &:erlang.apply/2
    Args: [#Function<0.34921188/1 in Credo.Check.Readability.SpaceAfterCommas.do_run_on_all_source_files/3>, [%SourceFile<lib/credo_test.ex>]]

20:00:38.876 [error] Task #PID<0.2135.0> started from #PID<0.2120.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 9, 1, [], [{:eol, {8, 4, 1}}, {:end, {8, 1, nil}}, {:eol, {7, 6, 1}}, {:end, {7, 3, nil}}, {:eol, {6, 39, 1}}, {:atom, {6, 33, ~c"world"}, :world}, {:comp_op, {6, 30, nil}, :==}, {:")", {6, 28, nil}}, {:"(", {6, 27, nil}}, {:paren_identifier, {6, 22, ~c"hello"}, :hello}, {:., {6, 21, nil}}, {:alias, {6, 12, ~c"CredoTest"}, :CredoTest}, {:identifier, {6, 5, ~c"assert"}, :assert}, {:eol, {5, 29, 1}}, {:do, {5, 27, nil}}, {:bin_string, {5, 8, nil}, ["greets the world"]}, {:identifier, {5, 3, ~c"test"}, :test}, {:eol, {3, 20, 2}}, {:alias, {3, 11, ~c"CredoTest"}, :CredoTest}, {:identifier, {3, 3, ~c"doctest"}, :doctest}, {:eol, {2, 18, 1}}, {:alias, {2, 14, ~c"Case"}, :Case}, {:., {2, 13, nil}}, {:alias, {2, 7, ~c"ExUnit"}, :ExUnit}, {:identifier, {2, 3, ~c"use"}, :use}, {:eol, {1, 27, 1}}, {:do, {1, 25, nil}}, {:alias, {1, 11, ~c"CredoTestTest"}, :CredoTestTest}, {:identifier, {1, 1, ~c"defmodule"}, :defmodule}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/check/readability/parentheses_in_condition.ex:36: Credo.Check.Readability.ParenthesesInCondition.run/2
    (credo 1.7.6) lib/credo/check/readability/parentheses_in_condition.ex:2: Credo.Check.Readability.ParenthesesInCondition.do_run_on_source_file/3
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.17.0) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: &:erlang.apply/2
    Args: [#Function<2.16007744/1 in Credo.Check.Readability.ParenthesesInCondition.do_run_on_all_source_files/3>, [%SourceFile<test/credo_test_test.exs>]]

20:00:38.876 [error] Task #PID<0.2130.0> started from #PID<0.2120.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 19, 1, [], [{:eol, {18, 4, 1}}, {:end, {18, 1, nil}}, {:eol, {17, 6, 1}}, {:end, {17, 3, nil}}, {:eol, {16, 11, 1}}, {:atom, {16, 5, ~c"world"}, :world}, {:eol, {15, 15, 1}}, {:do, {15, 13, nil}}, {:do_identifier, {15, 7, ~c"hello"}, :hello}, {:identifier, {15, 3, ~c"def"}, :def}, {:eol, {14, 6, 1}}, {:bin_heredoc, {6, 8, nil}, 2, ["Hello world.\n\n## Examples\n\n    iex> CredoTest.hello()\n    :world\n\n"]}, {:identifier, {6, 4, ~c"doc"}, :doc}, {:at_op, {6, 3, nil}, :@}, {:eol, {4, 6, 2}}, {:bin_heredoc, {2, 14, nil}, 2, ["Documentation for `CredoTest`.\n"]}, {:identifier, {2, 4, ~c"moduledoc"}, :moduledoc}, {:at_op, {2, 3, nil}, :@}, {:eol, {1, 23, 1}}, {:do, {1, 21, nil}}, {:alias, {1, 11, ~c"CredoTest"}, :CredoTest}, {:identifier, {1, 1, ~c"defmodule"}, :defmodule}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/check/readability/parentheses_in_condition.ex:36: Credo.Check.Readability.ParenthesesInCondition.run/2
    (credo 1.7.6) lib/credo/check/readability/parentheses_in_condition.ex:2: Credo.Check.Readability.ParenthesesInCondition.do_run_on_source_file/3
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.17.0) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: &:erlang.apply/2
    Args: [#Function<2.16007744/1 in Credo.Check.Readability.ParenthesesInCondition.do_run_on_all_source_files/3>, [%SourceFile<lib/credo_test.ex>]]

20:00:38.876 [error] Task #PID<0.2139.0> started from #PID<0.2120.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 2, 1, [], [{:eol, {1, 15, 1}}, {:")", {1, 14, nil}}, {:"(", {1, 13, nil}}, {:paren_identifier, {1, 8, ~c"start"}, :start}, {:., {1, 7, nil}}, {:alias, {1, 1, ~c"ExUnit"}, :ExUnit}], []}
    (credo 1.7.6) lib/credo/code.ex:138: Credo.Code.to_tokens/2
    (credo 1.7.6) lib/credo/check/readability/parentheses_in_condition.ex:36: Credo.Check.Readability.ParenthesesInCondition.run/2
    (credo 1.7.6) lib/credo/check/readability/parentheses_in_condition.ex:2: Credo.Check.Readability.ParenthesesInCondition.do_run_on_source_file/3
    (elixir 1.17.0) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.17.0) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: &:erlang.apply/2
    Args: [#Function<2.16007744/1 in Credo.Check.Readability.ParenthesesInCondition.do_run_on_all_source_files/3>, [%SourceFile<test/test_helper.exs>]]
rrrene commented 2 months ago

@zacky1972 Thx for reporting! Upgrading Credo to 1.7.7 should fix your problem :v:

/cc @phinnaeus @nathanl @whatyouhide @leobessa @hez @rlopzc @GRoguelon

hez commented 2 months ago

@zacky1972 Thx for reporting! Upgrading Credo to 1.7.7 should fix your problem ✌️

/cc @phinnaeus @nathanl @whatyouhide @leobessa @hez @rlopzc @GRoguelon

Thank you! That was amazingly fast! Worked here

zacky1972 commented 2 months ago

@rrrene I've just found Credo has been fixed! Thank you!

leobessa commented 2 months ago

Thanks, @rrrene ! I've upgraded to 1.7.7 and the problem now is fixed here too.