3 ms·
Did you mean code style automation back then? Today's code style automation seems pretty solid.
by chrisan 4y ago
Did you mean code style automation back then? Today's code style automation seems pretty solid.
- mtlmtlmtlmtl 4y agoNo idea what they do in the kernel now, but back then there was no automation, just that giant perl script that told you all the places where the style diverged from guidelines.
- MrJohz 4y agoI don't know about the Linux codebase either, but a lot of languages these days tend to have an CST-based formatter - given a syntactically correct but arbitrarily formatted file, it will essentially rewrite it into a standardised form. There's a lot of cleverness going on on top of that - using the context of the code to format things in different ways - but the core idea is generally to parse the code and then format that, rather than apply purely text-based rules. The benefit of this is that it almost cannot go wrong (unlike older formatters which might stumble over a line of code and accidentally write invalid or incorrect code). The disadvantage is that there are usually fewer configuration options, so if you don't like the formatting, you might just be stuck with it anyway.
- mtlmtlmtlmtl 4y agoYeah, rustfmt, gofmt etc is wonderful. Definitely been a lot of progress on this lately, with more modern languages anyway.