Bug 1188202 (clang-format)

Reformat everything to Mozilla style

NEW
Unassigned

Status

3 years ago
4 months ago

People

(Reporter: poiru, Unassigned)

Tracking

(Depends on: 10 bugs)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
We clang-format all code on a directory-by-directory basis. Once everything is more or less proper Mozilla style, we can integrate clang-format into the development workflow.
(Reporter)

Updated

3 years ago
Depends on: 1204606
Depends on: 1222666
Depends on: 1322321
Depends on: 1324382
Depends on: 1328844
Depends on: 1329191
Depends on: 1340143
Depends on: 1340144
I don't think this should be a goal.
Please link to the discussion that lead to this decision.
Flags: needinfo?(birunthan)
(Reporter)

Comment 2

2 years ago
Unifying Mozilla style has been discussed on mozilla.dev.platform numerous times. Because people have strong feelings for and against this, these discussions have never led anywhere.

Together with bsmedberg (who is the effective owner of C++ code style), we decided to delegate the decision to our distinguished engineers. bz, dbaron, roc, and I got together during the Orlando work week and decided we *should* unify our code style using an automated tool like clang-format. There were some open questions regarding e.g. rebasing over code style changes, but the decision still holds.

If you have specific concerns about how a unified code style would negatively affect you, please let us know!
Flags: needinfo?(birunthan)
Just like Birunthan said. I am currently working on it. We are currently working on clang-format to address some bugs and difference of behavior with our coding style.
(In reply to Birunthan Mohanathas [:poiru] from comment #2)
> Unifying Mozilla style has been discussed on mozilla.dev.platform numerous
> times. Because people have strong feelings for and against this, these
> discussions have never led anywhere.
> 
> Together with bsmedberg (who is the effective owner of C++ code style), we
> decided to delegate the decision to our distinguished engineers. bz, dbaron,
> roc, and I got together during the Orlando work week and decided we *should*
> unify our code style using an automated tool like clang-format. There were
> some open questions regarding e.g. rebasing over code style changes, but the
> decision still holds.
>
> If you have specific concerns about how a unified code style would
> negatively affect you, please let us know!

I have concerns about it both specifically and in general that I feel were never addressed. What is the correct forum to discuss this?
Flags: needinfo?(birunthan)
> What is the correct forum to discuss this?
You can expose your concerns here Jeff.
Flags: needinfo?(birunthan)
Depends on: 1340878
(In reply to Sylvestre Ledru [:sylvestre] from comment #3)
> Just like Birunthan said. I am currently working on it. We are currently
> working on clang-format to address some bugs and difference of behavior with
> our coding style.

This isn't actually a well known thing.  Perhaps the Orlando decision was communicated in some forum that didn't reach everybody, or didn't sink in.  At the least, all the module owners should be formally informed and given a chance to understand the reasons and implications.  I don't see them all on the CC-list in this bug, and I'd probably want them all needinfo'd and signing off on this decision, for their module.  Doesn't feel like something you would want to railroad "from the top" overriding the module owners.

And then you'd want to check with all the managers that are responsible for delivering functionality during the period that these changes would come online.  For example, I will oppose any graphics code being touched for "white space" type of changes during 2017 because of the Quantum Render project.  Last thing we need is a code churn making things more difficult.  Unless this project is also P0 priority, that is.
Depends on: 1342657
Depends on: 1342665
Depends on: 1343068
Depends on: 1347474
Depends on: 1374720
Depends on: 1376803
Depends on: 1378250
Depends on: 1387035
Depends on: 1387036
Depends on: 1389898
Depends on: 1391219
Depends on: 1391231
Depends on: 1391233
Depends on: 1392012
Depends on: 1395296
Depends on: 1396515
Depends on: 1397453
Depends on: 1397457
Depends on: 1399087
Depends on: 1399102
Depends on: 1340083
Depends on: 1399359
Depends on: 1403150
Depends on: 1403292
Depends on: 1406310
Depends on: 1410472
Depends on: 1410938
Depends on: 1411004
Depends on: 1411807
Depends on: 1413103
Depends on: 1413490
Depends on: 1413609
Depends on: 1413612
Depends on: 1414764
Depends on: 1405554
Depends on: 1429015
Depends on: 1430360
Depends on: 1430792
Depends on: 1431030

Updated

6 months ago
Product: Core → Firefox Build System
Depends on: 1453973
You need to log in before you can comment on or make changes to this bug.