2017 and contributors still need to discuss about coding style =/
If you want to enforce codding style (which is OK) you need to provide developers the tools to ease that process.
Contributing with patches to 15 different projects, using 15 different rules for styling makes it impossible to keep up.
FOSS projects should start using tools like clang-format so developers don't need care if a project use 2/4/6/8 spaces instead of tab. The tool should be able to automatically format the code before committing.
Some projects even use git hooks to compare the commit with auto-generated styling tools to check if it follows the rules.
Sure, it's difficult for a committer to keep up with all of the different styles. Imagine being a developer on a project with 50 different committers, all doing it their own way.
As a committer, I would rather have it clearly explained what the rules are before I do it incorrectly. Sure, having tools that will do it for me is awesome, but considering how many examples in the OP are different because of historical reasons, those tools are difficult to configure.
> Sure, it's difficult for a committer to keep up with all of the different styles. Imagine being a developer on a project with 50 different committers, all doing it their own way.
That's exactly what tools like clang-format fixes. Code will be in the repository using one correct styling. The difference is that the commiter won't have to style it himself.
> As a committer, I would rather have it clearly explained what the rules are before I do it incorrectly. Sure, having tools that will do it for me is awesome, but considering how many examples in the OP are different because of historical reasons, those tools are difficult to configure.
Which tools you said that are difficult to configure? clang-format? It's 5~20 lines in a .clang-format in the root folder of your repo. Configure it once and profit forever.
* I'm talking about clang-format here because that's what I use for C/C++. I don't know anything about other languages.
How well does clang-format handle subfolders with their own rules? I don't know, as I'm not a C/C++ developer; but I know that the tools I use don't handle them very well. I still provide them, of course, because it's better than nothing.
It's the same for any other mental load that could be offloaded to machine. Coding style? Don't demand people sticking to rules - use some formatter/prettyfier/linter. Well known and frequent bugs? At least try to use static analysis or write tests and run those with some sanitizer. Codebase too big/convoluted/... - use some tools (parsers, indexers, search) to get better insight. Just try use proper tools and machines.
If you want to enforce codding style (which is OK) you need to provide developers the tools to ease that process.
Contributing with patches to 15 different projects, using 15 different rules for styling makes it impossible to keep up.
FOSS projects should start using tools like clang-format so developers don't need care if a project use 2/4/6/8 spaces instead of tab. The tool should be able to automatically format the code before committing.
Some projects even use git hooks to compare the commit with auto-generated styling tools to check if it follows the rules.