3 ms·
This is fine, in moderation! I'm objecting to the linter tool itself being configurable.
by preseinger 5y ago
This is fine, in moderation! I'm objecting to the linter tool itself being configurable.
- db48x 5y agoGolint is the worst precisely because it isn’t configurable, and some of the things it looks for are idiotic. “should replace i += 1 with i++” is probably the worst advice I have ever received.
- tialaramex 5y agoI can see Go's point here though. Unlike C-style languages where i++ is an expression, in Go it's only a statement, it has no value, which eliminates some footgun opportunities. It's a halfway house to a language like Swift or Rust where none of the assignments have value. So, in a context where you don't want a value, arguably i++ is a better choice by eliminating a footgun. I don't hate it.
- preseinger 5y agoIf a linter is configurable it is no longer a linter.