Closed
Bug 1018586
Opened 10 years ago
Closed 10 years ago
Pretty Print should indent switch statement like CodeMirror and MDN Coding Style
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 32
People
(Reporter: anaran, Assigned: anaran)
References
Details
Attachments
(1 file, 1 obsolete file)
Pretty Print currently does: switch (x) { case a: foo(); break; default: bar() } CodeMirror Shift-Tab and https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Control_Structures do and say respectively: switch (x) { case a: foo(); break; default: bar() } I am separating my implementation from Bug 975477 comment 5 now in the hope they will be more acceptable separately.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8432125 -
Flags: review?(nfitzgerald)
Comment 2•10 years ago
|
||
We don't use the mdn coding style in devtools, but I'll take a look at the code and if it doesn't complicate things too much I'll r+.
Comment 3•10 years ago
|
||
Comment on attachment 8432125 [details] [diff] [review] 0001-Bug-1018586-Pretty-Print-should-indent-switch-statem.patch Review of attachment 8432125 [details] [diff] [review]: ----------------------------------------------------------------- Can't see enough context, when you upload patches make sure you format them with 8 lines of context. See the -U 8 stuff here: https://developer.mozilla.org/en-US/docs/Creating_a_patch_that_can_be_checked_in However, in this special case where pretty-fast is an upstream project, can you just submit PRs there and then I can just merge upstream when PRs land.
Attachment #8432125 -
Flags: review?(nfitzgerald)
Comment 4•10 years ago
|
||
Needs test(s) as well.
Assignee | ||
Comment 5•10 years ago
|
||
OK, I'll submit a PR with test.
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] from comment #4) > Needs test(s) as well. Oh wait, there is an existing switch indentation test that will fail with my patch. Shouldn't I just update that and be done with the test coverage?
Comment 7•10 years ago
|
||
Sounds good.
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8432125 -
Attachment is obsolete: true
Attachment #8432726 -
Flags: review?(nfitzgerald)
Comment 9•10 years ago
|
||
Comment on attachment 8432726 [details] [review] Upstream pull request, with updated test coveralge Created bug 1020587 to update pretty-fast in the tree.
Attachment #8432726 -
Flags: review?(nfitzgerald)
Comment 10•10 years ago
|
||
Resolved as part of https://hg.mozilla.org/mozilla-central/rev/e157171a4df1
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Assignee: nobody → adrian
Target Milestone: --- → Firefox 32
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•