Closed Bug 1375876 Opened 7 years ago Closed 5 years ago

clang-format NSPR

Categories

(NSPR :: NSPR, enhancement)

4.15
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: KaiE, Assigned: KaiE)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

It would be nice to reformat the NSPR code, like we did with NSS.

I'd like to do this soon. But before that, we need to complete bug 1535665, to ensure Ludo's patches don't bitrot.

Assignee: nobody → kaie
QA Contact: jjones
Attached file list

Mike, I'd like to reformat NSPR in the same way as we do for NSS, same rules, same version of clang-format.
Are you OK with that? Can I use your r+ for that change, or maybe I don't need a review at all?
I've already tested the reformatted code with both NSS test suite and Firefox, and didn't see any regressions.

I'm attaching the list of files that will be touched.

This is the copied .clang-format file from NSS, and a copied and modified version of the run_clang_format.sh file.

The only modification to run_clang_format.sh is the list of excluded directories.

This script won't be used automatically, but can executed on demand.

In a second step we can consider to hook it up to the NSS taskcluster automation.

Flags: needinfo?(mh+mozilla)
Blocks: 1562330

What does the formatting look like?

Flags: needinfo?(mh+mozilla)

Mike, I had sent you an email with subject "nspr-reformat.patch", did you get it?

It's pretty large, I didn't want to attach it in bugzilla.

Flags: needinfo?(mh+mozilla)

Can you put it on phabricator?

Flags: needinfo?(mh+mozilla)

Done. I guess it's OK for skimming and having a look. But reviewing the individual changes would be overkill.

The goal is that we'd not touch the formatting ourselves, but rely on clang-format to decide how it looks. The same is done for NSS.

No longer blocks: 1562330
Attachment #9074736 - Attachment mime type: application/octet-stream → text/plain
Attachment #9075609 - Attachment is obsolete: true
See Also: → 1581890

This is more work than I thought. I'd like to start with bug 1581890 instead.

I'm not happy how clang-format behaves with NSPR.
I like the artistic style utility better, because it's less invasive.

Given that NSPR isn't developed very actively, it might be sufficient to a one-time cleanup, and only occasionally re-run a prettier.
Therefore I'd like to close this for now, and only do the work in bug 1581890.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: