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 upgrading project to Elixir 1.17 #1142

Closed ViseLuca closed 2 months ago

ViseLuca commented 2 months ago
** (CaseClauseError) no case clause matching: {:ok, 127, 1, [], [{:eol, {126, 4, 1}}, {:end, {126, 1, nil}}, {:eol, {125, 72, 1}}, {:")", {125, 71, nil}}, {:int, {125, 70, 0}, ~c"0"}, {:",", {125, 68, 0}}, {:atom, {125, 59, ~c"failures"}, :failures}, {:",", {125, 57, 0}}, {:identifier, {125, 50, ~c"context"}, :context}, {:"(", {125, 49, nil}}, {:paren_identifier, {125, 46, ~c"get"}, :get}, {:., {125, 45, nil}}, {:alias, {125, 42, ~c"Map"}, :Map}, {:kw_identifier, {125, 38, ~c"do"}, :do}, {:",", {125, 36, 0}}, {:")", {125, 35, nil}}, {:"}", {125, 34, nil}}, {:identifier, {125, 27, ~c"context"}, :context}, {:kw_identifier, {125, 18, ~c"context"}, :context}, {:"{", {125, 16, nil}}, {:%{}, {125, 16, nil}}, {:"(", {125, 15, nil}}, {:paren_identifier, {125, 7, ~c"failures"}, :failures}, {:identifier, {125, 3, ~c"def"}, :def}, {:eol, {123, 6, 2}}, {:end, {123, 3, nil}}, {:eol, {122, 8, 1}}, {:end, {122, 5, nil}}, {:eol, {121, 12, 1}}, {false, {121, 7, nil}}, {:eol, {120, 9, 1}}, {:block_identifier, {120, 5, nil}, :else}, {:eol, {119, 75, 1}}, {:")", {119, 74, nil}}, {:"(", {119, 73, nil}}, {:paren_identifier, {119, 61, ~c"max_attempts"}, :max_attempts}, {:., {119, 60, nil}}, {:identifier, {119, 54, ~c"module"}, :module}, {:rel_op, {119, 52, nil}, :<}, {:")", {119, 50, nil}}, {:identifier, {119, 43, ...}, :context}, {:"(", {119, ...}}, {:paren_identifier, {...}, ...}, {:., ...}, {...}, ...], []}
    (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/code.ex:176: Credo.Code.clean_charlists_strings_and_sigils/1
    (credo 1.7.6) lib/credo/check/config_comment_finder.ex:36: Credo.Check.ConfigCommentFinder.find_config_comments/1
    (credo 1.7.6) lib/credo/check/config_comment_finder.ex:22: Credo.Check.ConfigCommentFinder.find_and_set_in_source_file/1
    (elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2

Upgrading our project to Elixir 1.17 we are facing this issue

rrrene commented 2 months ago

Which version of Credo are you using?

Normally this info is requested in our issue template. Did that template not work for you?

rrrene commented 2 months ago

Ah, I see it in the stacktrace.

Please upgrade Credo to 1.7.7 👍

ViseLuca commented 2 months ago

Oh yes, I checked maybe just before the release 😅 thank you!