Skip to content
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

Scout format ! #74

Merged
merged 2 commits into from
Jan 12, 2020
Merged

Scout format ! #74

merged 2 commits into from
Jan 12, 2020

Conversation

o0Ignition0o
Copy link
Owner

@o0Ignition0o o0Ignition0o commented Jan 7, 2020

Will fix #72 sooner than expected :D
todo: handle relative/absolute paths in the rustfmt linter, and later provide a --fix option

@codecov
Copy link

codecov bot commented Jan 7, 2020

Codecov Report

Merging #74 into master will increase coverage by 7.2%.
The diff coverage is 91.18%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #74     +/-   ##
=========================================
+ Coverage   85.34%   92.54%   +7.2%     
=========================================
  Files           5        7      +2     
  Lines         546      604     +58     
=========================================
+ Hits          466      559     +93     
+ Misses         80       45     -35
Impacted Files Coverage Δ
cargo-scout-lib/src/vcs/git.rs 92.2% <100%> (-0.65%) ⬇️
cargo-scout-lib/src/utils.rs 100% <100%> (ø)
cargo-scout-lib/src/linter/clippy.rs 85% <81.81%> (+14.93%) ⬆️
cargo-scout-lib/src/linter/rustfmt.rs 89.55% <89.55%> (ø)
cargo-scout/src/main.rs 96.29% <90%> (+32.4%) ⬆️
cargo-scout-lib/src/scout/mod.rs 97.12% <95.23%> (+3.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85f41a1...2226b1a. Read the comment docs.

@o0Ignition0o o0Ignition0o force-pushed the scout_fmt branch 4 times, most recently from 41a8b0d to 2f6e2a0 Compare January 8, 2020 07:54
@o0Ignition0o
Copy link
Owner Author

I'm going to work on tests, and submit it.

@o0Ignition0o o0Ignition0o force-pushed the scout_fmt branch 3 times, most recently from 9b158c8 to ba2f123 Compare January 11, 2020 22:22
@o0Ignition0o o0Ignition0o changed the title WIP: Scout format ! todo: handle relative/absolute paths in the rustf… Scout format ! Jan 11, 2020
@o0Ignition0o o0Ignition0o marked this pull request as ready for review January 11, 2020 23:00
@o0Ignition0o o0Ignition0o force-pushed the scout_fmt branch 9 times, most recently from 5a9ed15 to 354d0e1 Compare January 12, 2020 00:33
@o0Ignition0o
Copy link
Owner Author

Yay CI passes after 3 minutes instead of 15

@o0Ignition0o
Copy link
Owner Author

@daubaris @undef1nd @ebroto If anyone has a bit of time to have a look at this? ^^.
The major change is that cargo-scout has now two subcommands, fmt and lint.

Next up we want to add a --fix option to the subcommands, so the lints try to get fixed instead of being displayed ^^

@o0Ignition0o o0Ignition0o force-pushed the scout_fmt branch 2 times, most recently from 51fbf92 to 6008e32 Compare January 12, 2020 13:26
Copy link
Contributor

@ebroto ebroto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @o0Ignition0o, this is a great step forward for cargo-scout!

I think there's only a minor problem with the CI, the rest of comments I left are nits :)

Awesome job!

.travis.yml Outdated Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
cargo-scout-lib/src/linter/clippy.rs Show resolved Hide resolved
cargo-scout-lib/src/linter/rustfmt.rs Outdated Show resolved Hide resolved
cargo-scout-lib/src/linter/rustfmt.rs Outdated Show resolved Hide resolved
cargo-scout-lib/src/scout/mod.rs Outdated Show resolved Hide resolved
cargo-scout-lib/src/vcs/git.rs Outdated Show resolved Hide resolved
cargo-scout-lib/src/vcs/git.rs Outdated Show resolved Hide resolved
@ebroto
Copy link
Contributor

ebroto commented Jan 12, 2020

Also, not related to this PR though, some thoughts on usability.

I was testing the changes on an old copy of the repo, and the master branch was really old. I forgot that the default target branch is master (I was on this branch), so I was not getting the expected results.

Do you think that it would make sense to use HEAD as the default target? I believe this is what most users would expect.

@o0Ignition0o
Copy link
Owner Author

That's a very good idea indeed, let's file an issue for it, it probably would make more sense than master as a default setting !

Added a build cache + Avoid running tests twice on stable.
@o0Ignition0o
Copy link
Owner Author

Thank you so much for such a thorough review, that allowed us to catch the bug !
I'm going to bump the version and release it.
The next milestone will diff against HEAD and feature --fix :D

@o0Ignition0o o0Ignition0o merged commit 22363e8 into master Jan 12, 2020
@o0Ignition0o o0Ignition0o deleted the scout_fmt branch January 12, 2020 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Format changed code?
2 participants