Open aktasfatih opened 2 years ago
No, there's not. Are you imagining it would run tidy first, then lint? I think that's not too hard to add.
Yes, that is what I had in my mind. Anything that runs both when one of lint
or tidy
is not specified, or an extra command like clean
that could do the job. I could create a PR if you like, depending on your preference.
I don't think I'd want this to be the default behavior, but a new subcommand called clean
would work. I'm not sure about the name, but that's easy enough to change before this is released.
If you're up for a it, a PR would be great!
I'm in the middle of some big changes to this code, but I think you should only need to change the precious-core/src/precious.rs
file for a PR to add this, as well as the README.md
and adding some integration tests in precious-integration
. I'm pretty sure that won't have any significant conflicts with what I'm working on. If there are conflicts I can figure them out.
But just take this as a heads up that it might take me a little longer to review and merge this PR than it otherwise might.
No worries. It is not urgent. Thanks for the quick reply and the heads up. 👍 I'll get on it.
I agree that this would be a nice feature to have.
For most programs that have a tidy/fix option (e.g., golangci-lint
, black
, etc.), I think it would be sufficient to only run tidy
when the command can do both. I assume there are cases where this is not true, but it would be nice to avoid the extra lint run where it is true.
That's a good point, @oschwald. Some sort of config key for this would be good, like no_lint_on_both
or something like that.
Hi, is there a subcommand to run both
lint
andtidy
in one command ?