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 for Consistency Warning #660

Closed
tlux opened this issue Jun 5, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@tlux
Copy link

commented Jun 5, 2019

Environment

Credo version: 1.0.5
Erlang/Elixir version: 1.8.0
Operating system: macOS Mojave 10.14.5

What were you trying to do?

I got the following code snippet in my project.

entries
|> Stream.map(&json_library().encode!/1)
|> Enum.join("\n")

Expected outcome

No warning should be emitted.

Actual outcome

A warning is emitted:

Consistency
┃ 
┃ [C] ↗ There are spaces around operators most of the time, but not here.

As it seems, Credo thinks the arity part is actually a division by 1 which leads to a consistency warning being emitted. All other mathematical operations in the project have a spaces around the operators.

rrrene added a commit that referenced this issue Jun 10, 2019

@rrrene rrrene closed this in 6b7db32 Jun 10, 2019

@rrrene

This comment has been minimized.

Copy link
Owner

commented Jun 10, 2019

@tlux 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! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.