Style guidelines issue #111
Labels
discussion
General problem for which possible solutions need to be discussed
feature request
Desirable, nice-to-have feature
8000
The back-and-forth discussion in one of the recent pull requests (#105, already merged) has raised an issue with respect to IF and HOW we enforce the usage of the style guidelines we mention on our website.
There are numerous files on the master branch that do not comply to the style guidelines and any minor change to those files has the potential to transform itself into a huge git diff after proper formatting, making reviews of pull requests a nightmare. As far as I know, we run only our flavor of cpplint as a prerequisite for accepting pull requests and we do not run clang-format. As a result we have lines like these, where the spacing and/or indentation is all wrong:
So then I propose this topic of discussion:
Do we want to properly follow the style guideline?
If yes, this would first of all require some immediate steps to tidy-up what we currently have, i.e. a pull request to make the current master fully compliant with the style guidelines (by running a formatter on all files).
Secondly, Jenkins should run a formatter by default (not just cpplint) and new pull requests should only be validated if the proper formatting is used. With a master branch that complies with the style guidelines, this prerequisite would guarantee a nice and tidy git diff. This could be enforced by a git pre-push hook, for instance.
If we want to use a style guideline but we're not willing to enforce it, then we would always get into issues of huge git diffs, or having to make periodical style fix pull requests, neither of which is something desirable.
The text was updated successfully, but these errors were encountered: