Unclear how to run only a single rule
See original GitHub issueI’m unable to figure out how to run Putout with only a single rule enabled. One would assume that putout src --enable remove-unused-variables
, or that only having one plugin
/rule
specified in .putout.json would do the trick, but that turns out not to be the case, instead all default rules are enabled.
(This is not an issue as such, but if anyone could tell me how to do this I would like to add it to the docs. I do see now what --enable
does, but it’s not quite what one would expect.)
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (12 by maintainers)
Top Results From Across the Web
How do you run eslint for only a specific rule or set of rules
I know you can define rules in an .eslintrc file, but what if I just want to run eslint and check for one...
Read more >Snakefiles and Rules — Snakemake 7.19.1 documentation
Instead of a shell command, a rule can run some python code to generate the output: rule NAME: input: "path/to/inputfile", "path/to/other/inputfile" output: " ......
Read more >Programming Rules of Thumb
If the code exists in only one place, then it can be easily changed there. This rule is can even be applied to...
Read more >Video: Fix the “ambiguous outer join” error - Microsoft Support
Save and run the parent query. Rule of thumb for ambiguous outer joins. Ambiguous outer joins occur when you have two or more...
Read more >Choose vs. Chose - Confusing Words - Ginger Software
Only a single 'O' is added to make the sentences different, but the context completely changes. When to Use Choose + Original Examples....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hm yes I do see your point.
My idea was to propose something along the lines of:
Or possibly:
But alternatively I do like Milahu’s suggestion of disabling all defaults in the config:
as it would make Putout’s behaviour more in line with one’s expectations. For example, if one later adds some new code pattern one wouldn’t have to think “Do I have to turn all the defaults off in Putout again?”. It might also to make the config file more managable for those who are starting out with Putout and who are being cautious regarding transformations. At least in my case it wasn’t feasible to start with all defaults enabled since there are a handful of rules that cause my code to break in some subtle way, therefore I’ve been turning them on one by one to be able to review the outcome.
aah! : )
my error was to combine
--fix
and--disable-all
in one callin that case, putout should throw an error like “only one command per call” where commands are
--fix
,--disable-all
,--enable
, …