-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Use clang-format
in tidy
to check the C++ code style under llvm-wrapper
#123918
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #126540) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
clang-format
in tidy
to check the C++ code style under llvm-wrapper
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Looks great, thank you! @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (7033f9b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -3.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -2.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 696.035s -> 694.579s (-0.21%) |
What is the command to call this locally? I tried |
It's |
I see... It seems like the minimal command to make this work is What confused me is that |
I'm also wondering why |
I guess this is unexpected. It should print:
I guess it's because we can use cc @Kobzol |
I agree that displaying the diff by default is a good idea (not sure why we didn't do it before). When you run @tgross35 Any objections against just printing the Python/C++ linting/formatting diff by default? |
That sounds good to me, I don't know why I didn't just do that in the first place. I have also been meaning to change rust/src/bootstrap/src/core/config/flags.rs Lines 363 to 365 in f25e92b
Vec<ext_tool_checks::Arg> + enum Arg { Py, PyLint, Cpp, ... } so Clap handles printing the available options, since that doc comment is out of date. I'll probably get to that this week but if somebody beats me to it, be my guest 😆
|
Fixes #123510.
Based on the discussion at https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Enable.20.60clang-format.60.20for.20.60rustc.60.20compiler-team.23756/near/443562800, we can use clang-format from pip to achieve the code formatting.
r? @Kobzol