qri-io / .github

MIT License
0 stars 0 forks source link

80 col max line length #6

Open feep opened 3 years ago

feep commented 3 years ago

b5

I started doing this after reading about line breaks in the thanos style guide.

I keep a ruler at 80 characters in my editor, and if the arguments of a function exceed that length, switch to one arg per line. What do you think about making that a rule? If you're into it we can get this going in our new .github repo.

feep commented 3 years ago

gofmt was pretty radical when it came out.

After using it and liking it, then being away from go for a while, it’s really a little shocking how much more newer formatters like black or prettier or elm-format do to the code layout.

Instead of writing more rules for humans, maybe we want to go a little stricter on the auto-format @b5?

Like gofumpt?

I like its choices.

The nice thing is, its choices are completely compatible with gofmt. Nothing gofumpt does will be undone by gofmt.

It doesn’t do line length yet. But it’s planned, and there is a draft PR.