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

fix missing parentheses warning in Credo.Check.Params.category/2 #1159

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

Eiji7
Copy link
Contributor

@Eiji7 Eiji7 commented Nov 4, 2024

warning: using map.field notation (without parentheses) to invoke function Credo.Check.Refactor.ModuleDependencies.category() is deprecated, you must add parentheses instead: remote.function()
  (credo 1.7.9) lib/credo/check/params.ex:74: Credo.Check.Params.category/2
  (credo 1.7.9) lib/credo/check.ex:697: Credo.Check.format_issue/3
  (credo 1.7.9) lib/credo/check/refactor/module_dependencies.ex:111: Credo.Check.Refactor.ModuleDependencies.issues_for_module/5
  (credo 1.7.9) lib/credo/check/refactor/module_dependencies.ex:89: Credo.Check.Refactor.ModuleDependencies.traverse/6
  (elixir 1.17.3) lib/macro.ex:599: Macro.traverse/4

```
warning: using map.field notation (without parentheses) to invoke function Credo.Check.Refactor.ModuleDependencies.category() is deprecated, you must add parentheses instead: remote.function()
  (credo 1.7.9) lib/credo/check/params.ex:74: Credo.Check.Params.category/2
  (credo 1.7.9) lib/credo/check.ex:697: Credo.Check.format_issue/3
  (credo 1.7.9) lib/credo/check/refactor/module_dependencies.ex:111: Credo.Check.Refactor.ModuleDependencies.issues_for_module/5
  (credo 1.7.9) lib/credo/check/refactor/module_dependencies.ex:89: Credo.Check.Refactor.ModuleDependencies.traverse/6
  (elixir 1.17.3) lib/macro.ex:599: Macro.traverse/4
```
@Eiji7
Copy link
Contributor Author

Eiji7 commented Nov 4, 2024

Oh, was that intended change? In commit: 6127e70 there is a mention that module.function() notation is deprecated, but it produces warning as shown above … This warning is printed after updating credo dependency every time credo mix task is called. I'm using latest Elixir and Erlang versions.

@rrrene rrrene merged commit 6ca48ad into rrrene:master Nov 4, 2024
18 checks passed
@rrrene
Copy link
Owner

rrrene commented Nov 4, 2024

@Eiji7 Yeah, I made a mistake 😞 Will release your fix shortly! Thank you so much!

@rrrene
Copy link
Owner

rrrene commented Nov 4, 2024

@Eiji7 Your fix is part of Credo 1.7.10. Could you check?

@Eiji7
Copy link
Contributor Author

Eiji7 commented Nov 4, 2024

@rrrene No warning is printed now when calling credo mix task. 👍

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

Successfully merging this pull request may close these issues.

2 participants