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

By default each pin operator increases size in ABCSize refactor check #1155

Closed
Eiji7 opened this issue Oct 6, 2024 · 3 comments
Closed

By default each pin operator increases size in ABCSize refactor check #1155

Eiji7 opened this issue Oct 6, 2024 · 3 comments

Comments

@Eiji7
Copy link

Eiji7 commented Oct 6, 2024

Environment

  • Credo version (mix credo -v):
$ mix credo -v
1.7.8-ref.main.1d74cf6+uncommittedchanges
  • Erlang/Elixir version (elixir -v):
$ elixir -v
Erlang/OTP 27 [erts-15.1] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]

Elixir 1.17.3 (compiled with Erlang/OTP 27)
  • Operating system:

Gentoo Linux using desktop/plasma profile for version 23.0 and with kernel version 6.6.41.

What were you trying to do?

I'm trying to add pin (^) operator to pattern-matching.

Expected outcome

The pin operator does not affects ABC size or at least it should increase only by one no matter how much pin operators are used.

Actual outcome

When calling credo on a simple function each pin (^) operator by default increases ABC size by 1 which is ridiculous. Using a pin operator does not makes code less clean/readable and is terribly important in pattern-matching.

@Eiji7 Eiji7 changed the title ABCSize refactor check By default each pin operator increases size in ABCSize refactor check Oct 6, 2024
@rrrene
Copy link
Owner

rrrene commented Oct 8, 2024

Thx for reporting! 👍

rrrene added a commit that referenced this issue Oct 20, 2024
@rrrene
Copy link
Owner

rrrene commented Oct 20, 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! 👍

@Eiji7
Copy link
Author

Eiji7 commented Oct 20, 2024

@rrrene I can confirm that message disappear when using credo from git, thanks! 👍

@Eiji7 Eiji7 closed this as completed Oct 20, 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

2 participants