mrusme/superhighway84

Mix of tabs and spaces

Closed this issue · 2 comments

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

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.

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.