Closed Bug 1611580 Opened 5 years ago Closed 3 years ago

Automatic clang-format verification of comm-central c/C++ code

Categories

(Thunderbird :: Build Config, task)

task
Not set
normal

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
97 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: KaiE, Assigned: rjl)

References

Details

Attachments

(2 files)

Is there any treeherder / taskcluster job, that checks that committed code matches what clang-format produces? Could we have such a job, that's also executed for try-comm-central builds?

For mozilla-central, I think it's handled by getting nagged about it when phabricator checks the patch.

This is quite an ambitious project since not even M-C have automated checking, apart from perhaps in Phab, although that seems unlikely if you read on. They reformat manually in bug 1519636 (and occasionally bust things, see bug 1519636 comment #67).

So if I understand correctly, right now, if I check in unformatted code, nobody might notice.

There's a clang-format lint task that runs on try pushes for Mozilla code. Phabricator also runs it whenever someone submits a patch involving C/C++ code. The output from these jobs is a json file, which Phab must be reading and reporting on in some sensible way.

There's a number of source code linting type tasks that run that should probably be ported over.

Assignee: nobody → rob
Status: NEW → ASSIGNED
Component: General → Build Config

Depends on D132807

Target Milestone: --- → 97 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/ecacc921eb8f
Add third-party MAPI headers to .clang-format-ignore. r=darktrojan
https://hg.mozilla.org/comm-central/rev/d88e84d81280
Run clang-format for Thunderbird code in CI. r=darktrojan

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

Attachment

General

Created:
Updated:
Size: