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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

avinayak
Copy link

@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
```
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.

1 participant