Introduce Code convention
Posted 13 April 2012 - 05:04 AM
Unfortunately, with diverging style habitats, not only formatting, but naming and so on every change by a different developer usually not only changes the lines where the new functionality is implemented but also every other line because of reformatting. This is a big problem, since we are doing a lot of branches and merges using git and it es quite simple to do the merge, when the differences shown are only, where there is a difference in functionality. It becomes pure horror, when the whole file is shown as different caused only by different formatting.
This leads us to the next point. I really like the idea of sharing extensions for Yii. But the big problem for us is, that we usually have to do minor to major adaptions to the extensions and we therefore put it under version control as well. If the coding style used in an extensions is quite different from ours, it makes Checkstyle go crazy and makes the CI server sending a hellish red to the xtreme feedback device, melting our smartphones in agony. So we usually do not use most of the extensions, because adapting it to our style needs often takes longer than desirable. So please consider developing a code convention and provide a checkstyle configuration file for it.
Posted 15 April 2012 - 11:26 PM
But for your issue, can you exclude some extension folders from checkstyle? On Zurmo, we also have our own style checker, and we excluded extension folders from style checking. It doesn't worth modifying them, and what if authors publish improved version of their extension, you will have nightmare to update them.
Posted 16 April 2012 - 07:57 AM