Skip to content

Commit

Permalink
Remove deprecated module.function() notation
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
avinayak authored Sep 23, 2024
1 parent 2ca4467 commit f05c0db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/credo/check/params.ex
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ defmodule Credo.Check.Params do

@doc false
def category(params, check_mod) do
params[:__category__] || params[:category] || check_mod.category()
params[:__category__] || params[:category] || check_mod.category
end

@doc false
Expand Down

0 comments on commit f05c0db

Please sign in to comment.