-
Notifications
You must be signed in to change notification settings - Fork 110
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
CLI - Replace clippy with a manual check #1928
base: bfops/remove-io-macros
Are you sure you want to change the base?
Conversation
.run()?; | ||
anyhow::ensure!(out.status.success(), "clippy found a lint error"); | ||
let mut err_count: u32 = 0; | ||
for file in walkdir::WalkDir::new(project_path).into_iter() { |
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.
should we be walking the whole project directory? As-is, this erroneously catches some println
s in BitCraft's build.rs
. Should we be hardcoding to only look in src/
...?
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.
There does not appear to be a way to use e.g. cargo
to list all the source files, as far as I can find. It looks like the best we could do is parse the output of the cargo build in order to figure out which files were involved.
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.
Alternatively, we could add an extra argument that defaults to src/
, e.g. --lint-path
or something.
…move-io-macros' into bfops/replace-clippy
…move-io-macros' into bfops/replace-clippy
Description of Changes
We were apparently only using clippy to check for nonfunctional print statements (#1819).
This PR replaces our use of clippy (when building modules) with a manual check for disallowed print statements.
For me, this reduced the time of
cargo clean && time spacetime build
from2m15s
(with clippy) to1m30s
(without clippy).API and ABI breaking changes
Not breaking.
Expected complexity level and risk
2
Future work
The other items in #1819.
Testing
println!
to new module and observed thatspacetime build
produces an error: