Closed JelleZijlstra closed 3 years ago
I think more scalable is to give every fixer a name (like "error code" in linters) and allow to enable/disable them in unified way.
The first approach is how it is done in golangci-lint, flake8, and other linters:
--disable-all
and --enable-all
--enable=return-bool,return-str,arg-bool
and --disable=return-none
Another interesting approach is how I did in flakehell: Use +
for "enable", -
for "disable", and allow globs for plugins, and give priority to the last matching rule. For example, enable all plugins, except "return" ones but allow "return-none": --plugins='+*,-return-*,+return-none'
.
Similar to
--bool-param
.--int-param
will autoannotate any param with an integer default asint
.Do we need separate options for each of these? I like it when I'm applying a change so I can keep my diff focused, but users may also want to just do everything. Maybe we should add an
--all
option that enables all boolean options.