3 ms·
Nah, kernel coding style counts tabs as 8 characters for indentation purposes. It is also discouraged to nest conditional structures too deeply. Here's the ver
by MayeulC 3y ago
Nah, kernel coding style counts tabs as 8 characters for indentation purposes. It is also discouraged to nest conditional structures too deeply.
Here's the very opinionated documentation: https://www.kernel.org/doc/html/v6.5/process/coding-style.html https://www.kernel.org/doc/html/v6.5/process/coding-style.ht...
I also want to note that the 80 columns limit was bumped to 100, and is no longer strictly enforced: https://www.phoronix.com/news/Linux-Kernel-Deprecates-80-Col https://www.phoronix.com/news/Linux-Kernel-Deprecates-80-Col
- IggleSniggle 3y agoI wasn't entirely convinced by the opinionated style doc that 80 meant columns and not characters (of COURSE it means columns, the opposite would be nonsense, but sometimes I get stubborn), so I looked up the kernel repo and indeed, my comment didn't pass the sniff test OR the scripts/checkpatch.pl test, where the max_line_length is enforced using calls to expand_tab, which converts tabs into 8 spaces before checking the length of the line.