Open
Bug 1397453
Opened 7 years ago
Updated 2 years ago
[clang-format] Adapt to some js braces coding style
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement, P3)
Developer Infrastructure
Lint and Formatting
Tracking
(Not tracked)
NEW
People
(Reporter: Sylvestre, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Enum, class, Function, Struct and Union:
=>
enum XchgStoreOp
{
DoExchange,
DoStore
};
SplitEmptyFunction: true
HashableValue()
: value(UndefinedValue())
{
}
instead of
{}
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → sledru
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8905247 [details]
Bug 1397453 - Adapt to some js braces coding style
https://reviewboard.mozilla.org/r/177040/#review182290
::: js/src/.clang-format:12
(Diff revision 1)
> # We require 80-col comments and 99-col code.
> CommentPragmas: "^"
>
> SortIncludes: false
> +BreakBeforeBraces: Custom
> +BraceWrapping:
AfterControlStatement is only a boolean, do we have a way to specify to wrap the braces when we have a if statement with a multi-line condition aligned at the same level as the code?
::: js/src/.clang-format:15
(Diff revision 1)
> SortIncludes: false
> +BreakBeforeBraces: Custom
> +BraceWrapping:
> + AfterEnum: true
> + AfterClass: true
> + AfterFunction: true
This one should be false for function definitions which are under classes declarations, and true for function definitions which out0side classes declarations, even if they are classes members.
class Foo {
void bar() {
return 42;
}
};
— or —
class Foo {
void bar();
};
void
Foo::bar()
{
return 42;
}
::: js/src/.clang-format:18
(Diff revision 1)
> + AfterEnum: true
> + AfterClass: true
> + AfterFunction: true
> + AfterStruct: true
> + AfterUnion: true
> + SplitEmptyFunction: true
Identically, This one should be false for function definitions which are under classes declarations, and true for function definitions which are outside classes declarations even if they are classes members.
Attachment #8905247 -
Flags: review?(nicolas.b.pierron) → review-
Updated•7 years ago
|
Priority: -- → P3
Updated•7 years ago
|
Product: Core → Firefox Build System
Reporter | ||
Updated•6 years ago
|
Assignee: sledru → nobody
Component: Source Code Analysis → Lint and Formatting
Updated•5 years ago
|
Summary: Adapt to some js braces coding style → [clang-format] Adapt to some js braces coding style
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•