mrusme / superhighway84

USENET-inspired, uncensorable, decentralized internet discussion system running on IPFS & OrbitDB
https://xn--gckvb8fzb.com/superhighway84
GNU General Public License v3.0
694 stars 24 forks source link

Mix of tabs and spaces #40

Closed mprimi closed 2 years ago

mprimi commented 2 years ago

This codebase is a mixture of spaces and tabs.

sample

Would you mind doing a pass and switching everything to one or the other?

(@mrusme I'm surprised you haven't noticed, I'm guessing you don't have invisibles turned on in your editor, and probably use different editors?)

I'd send a PR myself, but I don't want to 'steal' all of these LOCs from you! 🙂

$ grep -e  '^\t' *.go */*.go | wc -l
     245
$ grep -e  '^  ' *.go */*.go | wc -l
    1257
mrusme commented 2 years ago

Thanks Marco, you're correct, it should be spaces everywhere but it seems like vim-editorconfig doesn't quite work the way I expected it to do. I will change the lines that have tabs in them.

mrusme commented 2 years ago

Correction, the editorconfig plug works, it seems like vim-go is overriding spaces with tabs on save, for example when adjusting the imports. It's basically gofmt forcing what the Go people think is the only acceptable indentation for writing Go code.