Component/s: Coding style
I'd like to propose that we recommend or require the use of a trailing comma on multi-line array declarations, in PHP and JS.
- Adding additional keys to the array later leads to fewer lines of diff (1 addition, vs. 1 removal + 2 addition)
- Git blame and git history are clearer.
So this is a proposal to require the use of a trailing comma on multi-line array declarations.
Associated actions include:
a) Modify codechecker in order to provide basic support to the proposal above.
b) Document the change
c) Explicitly, it's NOT required to change all current old-style occurrences in the codebase. We'll follow a progressive approach here (new code and modified code).
And that's all. Options are:
A) We accept the change to require the use of a trailing comma on multi-line array declarations.
B) We continue as we are.