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 SinglePipe when piped after for special form #1163

Open
eksperimental opened this issue Nov 24, 2024 · 0 comments
Open

False-positive SinglePipe when piped after for special form #1163

eksperimental opened this issue Nov 24, 2024 · 0 comments

Comments

@eksperimental
Copy link

eksperimental commented Nov 24, 2024

Environment

  • Credo version (mix credo -v): 1.7.10-ref.main.b1010b5+uncommittedchanges
  • Erlang/Elixir version (elixir -v): Elixir 1.17.3 (compiled with Erlang/OTP 27)
  • Operating system:

What were you trying to do?

mix credo --strict

Expected outcome

for {major, patches} <- versions do
  # ...
end
|> Enum.reverse()

Actual outcome

  Code Readability
┃
┃ [R] ↗ Use a function call when a pipeline is only one function long.

Even with {Credo.Check.Readability.SinglePipe, [allow_0_arity_functions: true]} config this does not show the issue.

@eksperimental eksperimental changed the title False-positive SinglePipe with chained after for special form False-positive SinglePipe when piped after for special form Nov 24, 2024
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