3 ms·
Why would you care about the whitespace? Formatting is a job for computers, not humans. I'm practically unable to `git add` unformatted Go or Rust code, and ve
by yencabulator 3y ago
Why would you care about the whitespace? Formatting is a job for computers, not humans.
I'm practically unable to `git add` unformatted Go or Rust code, and very happy with the setup:
.config/git/attributes:
*.go filter=gofmt
*.cgo filter=gofmt
*.rs filter=rustfmt
.config/git/config:
[filter "gofmt"]
clean = "gofmt"
[filter "rustfmt"]
clean = "rustfmt --edition=2021"
- zarzavat 3y agoI’m not sure what relevance this has to files that use a mix of tabs and spaces because I’m not aware of any formatting tool that can reproduce that convention. Knowing whether a space in a space-formatted document is for alignment or indentation is AI complete.
- yencabulator 3y agoThe relevance is that I the human don't bother and the tools do it right. Go code uses both tabs and spaces...