[Automated review] Consider having reviewbot provide more actionable clang-format feedback
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement, P2)
Tracking
(Not tracked)
People
(Reporter: gregtatum, Assigned: andi)
References
Details
Reviewbot does not provide a very actionable message for clang-format. It is confusing because it gives a command that does not point to a real file. I would prefer a single command that I could copy, paste, and run from my terminal to fix the problem. For example, right now it lists:
./mach clang-format -s -p path/to/file.cpp
This command is confusing for two reasons:
- The path/to/file.cpp is not a real file, but looks like one.
- The command outputs a patch, but does not actually fix the problem.
At this point I have no single command I can run to just fix the problem.
I would prefer this command listed:
./mach clang-format -p toolkit/xre/nsEmbedFunctions.cpp
./mach clang-format -p js/xpconnect/src/XPCShellImpl.cpp
Or perhaps a one liner for the hg import
command.
Updated•6 years ago
|
How about just suggesting ./mach clang-format
(no args), as it works on a whole patch?
Reporter | ||
Comment 3•6 years ago
|
||
I believe ./mach clang-format
only works on uncommitted work. By the time a patch reaches phabricator, the code has already been committed, so it won't reformat the offending files.
Well, you'll be glad to learn that in fact it works on both uncommitted changes (if any) and the already-committed patch you're at. 😉
Comment 5•6 years ago
|
||
Andi, could you please take care of that?
Thanks
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
This has been fixed please see: https://github.com/mozilla/release-services/pull/2045
Updated•2 years ago
|
Description
•