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

Remove deprecated module.function() notation #1154

Merged
merged 2 commits into from
Oct 20, 2024
Merged

Conversation

avinayak
Copy link
Contributor

@avinayak avinayak commented Sep 23, 2024

Avoids this warning for elixir 1.17+

warning: using module.function() notation (with parentheses) to fetch map field :category is deprecated, you must remove the parentheses: map.field
  (credo 1.7.7) lib/credo/cli/output.ex:36: Credo.CLI.Output.check_tag/2
  (credo 1.7.7) lib/credo/cli/output/formatter/flycheck.ex:26: Credo.CLI.Output.Formatter.Flycheck.to_flycheck/1
  (credo 1.7.7) lib/credo/cli/output/formatter/flycheck.ex:12: anonymous fn/1 in Credo.CLI.Output.Formatter.Flycheck.print_issues/1
  (elixir 1.17.2) lib/enum.ex:987: Enum."-each/2-lists^foreach/1-0-"/2
  (credo 1.7.7) lib/credo/cli/command/suggest/suggest_command.ex:77: Credo.CLI.Command.Suggest.SuggestCommand.PrintResultsAndSummary.call/1

Avoids warning

```
warning: using module.function() notation (with parentheses) to fetch map field :category is deprecated, you must remove the parentheses: map.field
  (credo 1.7.7) lib/credo/cli/output.ex:36: Credo.CLI.Output.check_tag/2
  (credo 1.7.7) lib/credo/cli/output/formatter/flycheck.ex:26: Credo.CLI.Output.Formatter.Flycheck.to_flycheck/1
  (credo 1.7.7) lib/credo/cli/output/formatter/flycheck.ex:12: anonymous fn/1 in Credo.CLI.Output.Formatter.Flycheck.print_issues/1
  (elixir 1.17.2) lib/enum.ex:987: Enum."-each/2-lists^foreach/1-0-"/2
  (credo 1.7.7) lib/credo/cli/command/suggest/suggest_command.ex:77: Credo.CLI.Command.Suggest.SuggestCommand.PrintResultsAndSummary.call/1
```
@rrrene rrrene merged commit 6127e70 into rrrene:master Oct 20, 2024
18 checks passed
@rrrene
Copy link
Owner

rrrene commented Oct 20, 2024

@avinayak Thx for this! 👍

@rrrene
Copy link
Owner

rrrene commented Nov 3, 2024

@avinayak Thx! This is part of Credo 1.7.9 🎉

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