3 ms·
What's a language that lacks such a facility? ClangFormat covers C/C++/Java/JavaScript/Objective-C/Protobuf/C#. gofmt obviously can do Go. buildifier will rewr
by thedance 7y ago
What's a language that lacks such a facility? ClangFormat covers C/C++/Java/JavaScript/Objective-C/Protobuf/C#. gofmt obviously can do Go. buildifier will rewrite your Bazel BUILD files.
- frosted-flakes 7y agoThose aren't highly opionated default formatters though. The JavaScript community seems to have settled on Prettier as the go-to formatter, but not everyone uses it, and even Prettier had to add a bunch of options for certain things that will always be highly personal. Stuff like trailing commas, tabs vs spaces (and how many spaces‽), line lengths, and semicolons.
- klodolph 7y agoWell, one part of trailing commas in Prettier is that different versions of JavaScript support them in different places. With go fmt, the formatter is updated in lockstep with the language.
- pje 7y agoruby
- andrewzah 7y agoruby has rubocop, although it is more basic.