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)

enhancement

Tracking

(Not tracked)

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 {}
Assignee: nobody → sledru
Depends on: 1397457
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-
Priority: -- → P3
Product: Core → Firefox Build System
Assignee: sledru → nobody
Component: Source Code Analysis → Lint and Formatting
Summary: Adapt to some js braces coding style → [clang-format] Adapt to some js braces coding style
Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: