You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatically disable rules with lots of violations in --gen-config #617
--gen-config produces a list of excludes to disable a rule in all the files that violate it.
When a rule is violated in many files, this list grows so large that it's not very practical to use.
For example, running ameba --gen-config on https://github.com/crystal-lang/crystal found 584 violations of the Lint/NotNil rule in 151 different files. There's not much point in listing that many files. The exact filenames are largely noise (cf. #566) and provide no meaningful information.
To reduce the weight of the generated config, we can entirely disable a rule when the excludes list would be very long
Rubocop does this as well: https://docs.rubocop.org/rubocop/configuration.html#automatically-generated-configuration
If the number of excluded files is more then 15, it replaces the exclude list with an Enabled: false. The limit is configurable with the --exclude-limit option. It can be disabled with --no-exclude-limit.
I suggest implementing the same behaviour with the same options in ameba.
Maybe --no-exclude-limit is unnecessary and could be expressed as --exclude-limit=0.
Activity