3 ms·
I guess these are enough general: put operator sign before line break; don't break inside of the most nested expression; don't break between variable type and n
by andrey_utkin 10y ago
I guess these are enough general: put operator sign before line break; don't break inside of the most nested expression; don't break between variable type and name...
There are more such rules which differ between standards (like Linux kernel style vs. PHP PSR-2 style), e.g. how to pad trailing lines of function call. Linux style says to align trailing lines at offset next to the opening brace. (This doesn't look good in case of long function name, though, but most of time readability of this way is very good.) K&R is referenced as an original of such style, just as everywhere in Linux coding style. Also Linux coding style is not just what is told in Documentation/CodingStyle - there are some unwritten tools which you'll encounter when you run scripts/checkpatch.pl or get reviews on your patch submission.