Automatic clang-format verification of comm-central c/C++ code
Categories
(Thunderbird :: Build Config, task)
Tracking
(thunderbird_esr91 wontfix)
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?
Comment 1•5 years ago
|
||
For mozilla-central, I think it's handled by getting nagged about it when phabricator checks the patch.
Comment 2•5 years ago
|
||
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).
Reporter | ||
Comment 3•5 years ago
|
||
NSS executes it as a build job:
https://treeherder.mozilla.org/#/jobs?repo=nss&revision=fb7a589a069404bc20e88fbfd73895b90e001831
Reporter | ||
Comment 4•5 years ago
|
||
So if I understand correctly, right now, if I check in unformatted code, nobody might notice.
Assignee | ||
Comment 5•5 years ago
|
||
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 | ||
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D132807
Assignee | ||
Updated•3 years ago
|
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
Updated•3 years ago
|
Description
•