Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running credo fails #28

Open
carlgleisner opened this issue Oct 28, 2023 · 0 comments
Open

Running credo fails #28

carlgleisner opened this issue Oct 28, 2023 · 0 comments

Comments

@carlgleisner
Copy link

Environment

Erlang, Elixir and OTP versions

Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.15.7 (compiled with Erlang/OTP 26)

Operating system

macOS Sonoma 14.1

Current behaviour

Running mix credo fails throwing errors.

To reproduce

git clone https://github.com/anfly0/exBankID.git
cd exBankID
mix deps.get
mix compile
mix credo

Output

[intentionally omitted]

07:59:09.041 [error] Task #PID<0.4062.0> started from #PID<0.4030.0> terminating
** (CaseClauseError) no case clause matching: {:ok, 4, 1, [], [{:alias, {1, 1, ~c"ExUnit"}, :ExUnit}, {:., {1, 7, nil}}, {:paren_identifier, {1, 8, ~c"start"}, :start}, {:"(", {1, 13, nil}}, {:")", {1, 14, nil}}, {:eol, {1, 15, 2}}, {:alias, {3, 1, ~c"Code"}, :Code}, {:., {3, 5, nil}}, {:paren_identifier, {3, 6, ~c"require_file"}, :require_file}, {:"(", {3, 18, nil}}, {:bin_string, {3, 19, nil}, ["./test/helpers/helpers_test.exs"]}, {:")", {3, 52, nil}}, {:eol, {3, 53, 1}}]}
    (credo 1.5.3) lib/credo/code.ex:136: Credo.Code.to_tokens/2
    (credo 1.5.3) lib/credo/check/readability/parentheses_in_condition.ex:35: Credo.Check.Readability.ParenthesesInCondition.run/2
    (credo 1.5.3) lib/credo/check/readability/parentheses_in_condition.ex:2: Credo.Check.Readability.ParenthesesInCondition.do_run_on_source_file/3
    (elixir 1.15.7) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.15.7) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: #Function<5.56087938/0 in Credo.Check.Readability.ParenthesesInCondition.do_run_on_all_source_files/3>
    Args: []

Expected behaviour

Successful execution of mix credo with resulting static analysis.

Troubleshooting

I haven't dug deep into this but experienced the same issue on Elixir 1.14 and 1.13.

Upgrading credo to at least 1.6.0 resolves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant