Closed
Bug 1399087
Opened 7 years ago
Closed 7 years ago
Reformat dom/media/{MediaDecoder.*,MediaFormatReader.*,MediaDecoderOwner.h} with clang-format
Categories
(Core :: Audio/Video: Playback, enhancement)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: kikuo, Assigned: kikuo)
References
Details
Attachments
(1 file)
I'm gonna to land some patches which are reformatted with command "./mach clang-format", then I found lot of irrelevant codes were reformatted ...
So I'd like to initiate the new style by reformatting all codes under dom/media/SOME_FILES with clang-format.
So that people won't suffer if they're try to land patches with clang-formatted but found lot of differences.
Assignee | ||
Comment 1•7 years ago
|
||
The reason I'm not going to reformat all files under dom/media is that I'm not sure if there are any on-going huge works. I don't want to bother them.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8907042 -
Flags: review?(jwwang)
Updated•7 years ago
|
Component: Audio/Video → Audio/Video: Playback
Comment 4•7 years ago
|
||
Please don't.
After 58, we're going to have a code-wide reformatting.
And clang-format as it is today is still not 100% per coding style and this is being worked in.
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8907042 [details]
Bug 1399087 - Reformat dom/media/{MediaDecoder.*,MediaFormatReader.*,MediaDecoderOwner.h} with clang-format
https://reviewboard.mozilla.org/r/178764/#review184036
::: dom/media/MediaFormatReader.h:43
(Diff revision 2)
> };
>
> WaitForDataRejectValue(MediaData::Type aType, Reason aReason)
> : mType(aType)
> , mReason(aReason)
> - {
> + {}
that itself is not per coding style.
the style is the constructor definition takes more than one line, to have the braces on two lines.
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Classes
Attachment #8907042 -
Flags: review-
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8907042 [details]
Bug 1399087 - Reformat dom/media/{MediaDecoder.*,MediaFormatReader.*,MediaDecoderOwner.h} with clang-format
https://reviewboard.mozilla.org/r/178764/#review184038
Comment 7•7 years ago
|
||
Make sure you update your version of clang-format to at least the current working 5.0
Comment 8•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8907042 [details]
Bug 1399087 - Reformat dom/media/{MediaDecoder.*,MediaFormatReader.*,MediaDecoderOwner.h} with clang-format
https://reviewboard.mozilla.org/r/178764/#review184036
> that itself is not per coding style.
>
> the style is the constructor definition takes more than one line, to have the braces on two lines.
>
> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Classes
That would be a pain if you need to check formatting manually every time after running `mach clang-format`.
Comment 9•7 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #4)
> Please don't.
>
> After 58, we're going to have a code-wide reformatting.
>
> And clang-format as it is today is still not 100% per coding style and this
> is being worked in.
Do you mean we will also have a new version (after 58) of clang-format which will produce a format 100% compatible with our coding style?
Assignee | ||
Comment 10•7 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #7)
> Make sure you update your version of clang-format to at least the current
> working 5.0
IIRC, last night, I found it automatically downloaded/upgraded the clang-format version to 5.0 when I ran ./mach clang-format --path XXX
According to my test,
1) running |./mach clang-format --path PATH_TO_FILES| will reformat that file anyway (not only the diff)
2) running |./mach clang-format| will reformat the changed files of the last commit. (And also the local diff files)
So I think the best way for me now is to run |./mach clang-format| after I commit everything I've changed.
Thanks for the information.
I'll leave those files as they are.
Assignee | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Comment 11•7 years ago
|
||
(In reply to JW Wang [:jwwang] [:jw_wang] from comment #8)
> Comment on attachment 8907042 [details]
> Bug 1399087 - Reformat
> dom/media/{MediaDecoder.*,MediaFormatReader.*,MediaDecoderOwner.h} with
> clang-format
>
> https://reviewboard.mozilla.org/r/178764/#review184036
>
> > that itself is not per coding style.
> >
> > the style is the constructor definition takes more than one line, to have the braces on two lines.
> >
> > https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Classes
>
> That would be a pain if you need to check formatting manually every time
> after running `mach clang-format`.
Indeed.
I've lodged several bugs against clang-format. Though the current thought is to modify our coding style so that it matches the output of clang-format. This is being discussed in mozilla-dev
But in the mean time, I manually modify every single change made by clang-format.
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8907042 [details]
Bug 1399087 - Reformat dom/media/{MediaDecoder.*,MediaFormatReader.*,MediaDecoderOwner.h} with clang-format
https://reviewboard.mozilla.org/r/178764/#review184208
Attachment #8907042 -
Flags: review?(jwwang)
You need to log in
before you can comment on or make changes to this bug.
Description
•