Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That would be "astyle --style=linux" for example.


Or lindent, which I think is mentioned in the kernel style guide (it's a shell script that calls indent with set parameters).


Sadly, running Lindent on almost any existing source file in the tree will produce dozens of spurious diff hunks due to most other people manually formatting their code, so Lindent is quite useless in practice.

It really does bother me how much of the coders' and code reviewers' bandwidth in the kernel community is wasted due to these silly formatting issues. In most IDE-using communities these problems were solved a long time ago, by the IDE autoreformatting your code on commit, with no exceptions.


Linus could easily do "lindent reformat" commit every once in a while or even automate it. It seems they do not care that much for the styleguide?


Linus shuns commits that do nothing by reformat code. However, if you go in and make a change, then you'll probably get marked down by the maintainer if you don't fix up the formatting at that time.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: