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 within typespecs on NestedFunctionCalls code readability check #1170

Open
Eiji7 opened this issue Dec 18, 2024 · 1 comment
Open

Comments

@Eiji7
Copy link
Contributor

Eiji7 commented Dec 18, 2024

Environment

  • Credo version (mix credo -v):
$ mix credo -v
1.7.10-ref.(HEAD odłączone na origin/master).2e15cdd2
  • Erlang/Elixir version (elixir -v):
$ elixir -v
Erlang/OTP 27 [erts-15.2] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]

Elixir 1.18.0-rc.0 (f00f759) (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 have simply tried to use non-literal as Keyword's value. In my case it's user-defined type with some argument.

@type type_name :: Keyword.t(Some.remote(some_arg))

Expected outcome

This check should not appear for all Typespec attributes | Module @ Elixir documentation.

Actual outcome

Checking (…) source files ...

  Code Readability                                                                                                               
┃ 
┃ [R] → Use a pipeline instead of nested function calls.
┃       (…)

Please report incorrect results: https://github.com/rrrene/credo/issues

Analysis took 0.1 seconds (0.04s to load, 0.1s running 102 checks on (…) files)
(…) mods/funs, found 1 code readability issue.

Use `mix credo explain` to explain issues, `mix credo --help` for options.
@rrrene
Copy link
Owner

rrrene commented Dec 18, 2024

Thx for reporting! 👍

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