-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix command. #78
base: master
Are you sure you want to change the base?
Fix command. #78
Conversation
18e05d3
to
b45bf58
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #78 +/- ##
==========================================
- Coverage 92.24% 92.16% -0.08%
==========================================
Files 7 7
Lines 606 664 +58
==========================================
+ Hits 559 612 +53
- Misses 47 52 +5 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
fd57847
to
71977d6
Compare
A couple of tests in mod.rs and we're good to go ! |
@ebroto @davidhewitt please let me know what you think :) |
Many thanks for this! I will give it a shot next time I need to format a PR and report back :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @o0Ignition0o, LGTM!
I've just left a comment about a doubt I have. Otherwise I tested it and it seems to be working fine :)
Great work!
Lint(LintOptions), | ||
} | ||
|
||
#[derive(StructOpt)] | ||
enum FixCommand { | ||
Fmt(LintOptions), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to use FmtOptions
here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By LintOptions I mean something that returns lints, but I might have picked a poor name here.
The goal is to get anything that returns lints, and apply fixes on it.
Shoud I rename the options struct ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I could have explained myself better :)
I meant that right now cargo-scout fix fmt --help
shows the same options as cargo-scout lint --help
, which shows options that does not seem to belong to rustfmt, like
--no-default-features Pass the no default features flag to clippy
On the other hand, FmtOptions
seem to have the options related to rustfmt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I m sorry I havent seen your comments!
that makes sense indeed, I'm going to try to find a way to separate options from the logic, which will make it more reliable anyway
It only worked for the imports for me |
This will allow us to to fix the formatting issues by running:
cargo-scout fix fmt
Although it won't apply to clippy(yet?), it will allow us to close #72