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

False Positive: Macro sigils with uppercase words #1124

Closed
probably-not opened this issue Apr 1, 2024 · 4 comments
Closed

False Positive: Macro sigils with uppercase words #1124

probably-not opened this issue Apr 1, 2024 · 4 comments

Comments

@probably-not
Copy link

Environment

  • Credo version (mix credo -v): 1.7.5-ref.analytics-lib.029a107
  • Erlang/Elixir version (elixir -v): 1.16.1
  • Operating system: MacOS Ventura 13.5.2

What were you trying to do?

defmacro sigil_WORD({:<<>>, _, [string]}, []) do
  # ...
end

Expected outcome

No warnings

Actual outcome

  Code Readability                                                                                                    
┃ 
┃ [R] ↗ Function/macro/guard names should be written in snake_case.
┃       apps/xxx_web/lib/xxx_web/sigils.ex:12:12 #(XXXWeb.Sigils.sigil_WORD)

It looks like there's older bugs from before Elixir 1.15 that talk about this: #682
But whatever the fix was does not honor the new functionality added that allows multi-character uppercase sigils

@rrrene
Copy link
Owner

rrrene commented Apr 2, 2024

Thx for reporting! 👍

rrrene added a commit that referenced this issue Apr 3, 2024
@rrrene
Copy link
Owner

rrrene commented Apr 3, 2024

Thanks for reporting this 😀 It is now fixed on master.

You can try this by setting the Credo dep to

{:credo, github: "rrrene/credo"}

Please report back if your issue is solved! 👍

@probably-not
Copy link
Author

Looks like it's fixed! 🔥

Closed by 4f52c24

@rrrene
Copy link
Owner

rrrene commented May 9, 2024

@probably-not This is live in v1.7.6 🎉

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

2 participants