Credo.Check.Consistency.Collector.collect_matches

You're seeing just the callback collect_matches, go back to Credo.Check.Consistency.Collector module for more information.
Link to this callback

collect_matches(source_file, params)

View Source

Specs

collect_matches(source_file :: Credo.SourceFile.t(), params :: Keyword.t()) ::
  %{required(term()) => non_neg_integer()}

When you call @collector.find_and_append_issues/4 inside the check module, the collector first counts the occurrences of different matches (e.g. :with_space and :without_space for a space around operators check) per each source file.

collect_matches/2 produces a map of matches as keys and their frequencies as values (e.g. %{with_space: 50, without_space: 40}).

The maps for individual source files are then merged, producing a map that reflects frequency trends for the whole codebase.