Closed Bug 1343975 Opened 4 years ago Closed 4 years ago

Remove dos/windows endline characters from C++ sources


(Core :: General, enhancement)

Not set



Tracking Status
firefox54 --- fixed


(Reporter: dholbert, Assigned: dholbert)



(2 files, 1 obsolete file)

Our coding style guide requires:
> Unix-style linebreaks ('\n'), not Windows-style ('\r\n').

I'm filing this bug to fix all dos/windows-style linebreaks in our C++ sources in the tree.  (I was prompted by an issue with some being nearly-reintroduced, over in bug 1339298.)
Attachment #8842998 - Flags: review?(ehsan)
Odd! For some reason mozreview is representing this diff as *adding a file called "commit-message"* with the contents of my commit message. That is not how it's shown in my MQ patch locally; no idea why it's causing that.

This "commit-message" file is shown e.g. here:

I'll see if I can get that fixed, and then re-request review.
The corresponding "review summary" diff page does not show this "commit message" file, though...

Very odd.
Attached patch fix v1Splinter Review
RyanVM tells me the "commit-message" file is a MozReview implementation detail, from a recent change. *shrug*

In an abundance of paranoia, I'm going to just use a traditional bugzilla attachment here.

For review/auditing purposes, I've included the command that I used to generate the patch, which you can run locally to verify that your results match mine, if you like.  (It uses "fromdos" [from the tofrodos Ubuntu package.)

I've also verified locally that this is a purely whitespace change -- you can verify that by qimporting this patch and running:
  hg diff -w -r -2
Attachment #8842998 - Attachment is obsolete: true
Attachment #8843009 - Flags: review?(ehsan)
Attached image emacs-screenshot.png
(If you're interested in seeing the actual removal of the DOS newline characters, you can visualize them by opening the patch file in emacs and looking for "^M" special characters. Here's a screenshot of what that looks like for me, for the first chunk of the patch.)
Attachment #8843009 - Flags: review?(ehsan) → review+
Pushed by
Get rid of all dos/windows linebreaks in Mozilla C++ code. r=ehsan
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.