Top-level "package" and "import" statements should generally be kept on one
line, for all languages.
Details
Details
Diff Detail
Diff Detail
- Repository
- rC Clang
- Build Status
Buildable 29446 Build 29445: arc lint + arc unit
Event Timeline
| lib/Format/TokenAnnotator.cpp | ||
|---|---|---|
| 1079 | Nit: could we use CurrentToken->isOneOf(Keywords.kw_option,Keyswords.kw_package) | |
Comment Actions
This patch has caused a regression issue, see the test:
verifyFormat("// Detached comment\n\n"
"// Leading comment\n"
"syntax = \"proto2\"; // trailing comment\n\n"
"// in foo.bar package\n"
"package foo.bar; // foo.bar package\n");I have reverted it in rL356912.
Comment Actions
Just to confirm, the regression is in the number of spaces before a trailing comment?
Before (2 spaces):
package foo.bar; // foo.bar package
After (1 space):
package foo.bar; // foo.bar package
Top-level options are handled the same way. I'll see if I can address these both.
Nit:
could we use