Closed
Bug 1396515
Opened 6 years ago
Closed 6 years ago
Fix wrong && and || operators indentation
Categories
(Core :: Audio/Video: Playback, enhancement)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Over the year, we had changed the formatting of logical expression containing || and && to go from: if (a && b) to: if (a && b) this stemmed from a misreading of the coding style: "Overlong expressions not joined by && and || should break so the operator starts on the second line and starts in the same column as the start of the expression in the first line. This applies to ?:, binary arithmetic operators including +, and member-of operators (in particular the . operator in JavaScript, see the Rationale)." *not* joined by && and || is the keypard. So all are to be broken with the operator put at the front, except && and ||
Comment 1•6 years ago
|
||
I think we should run `mach clang-format` before landing a patch even if it is not 100% compatible with the Gecko coding style. Btw, what is clang-format's opinion about the position of && or ||?
Updated•6 years ago
|
Blocks: clang-format
Comment hidden (mozreview-request) |
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8904194 [details] Bug 1396515: Fix incorrect && and || operator placements. https://reviewboard.mozilla.org/r/175956/#review181170
Attachment #8904194 -
Flags: review?(sledru) → review+
Pushed by jyavenard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c884cca7be4a Fix incorrect && and || operator placements. r=sylvestre
![]() |
||
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c884cca7be4a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•