4 ms·
I'd like to add the most linters change things like line length and so on. However, this linter is changing the order of keys and values in a go struct (which I
by zikohh 4y ago
I'd like to add the most linters change things like line length and so on. However, this linter is changing the order of keys and values in a go struct (which I'd already formatted with go fmt), which makes it much harder to review than your typical line length change.
- gus_massa 4y ago> this linter is changing the order of keys and values in a go struct Is this a good idea?!?! I don't know golang. Can you show an example where this change is useful? (Or a link to a webpage that explains this change.) [Sorry for the side question, but I'm curious.]
- zikohh 4y agohttps://pastebin.com/Cdif0t5v https://pastebin.com/Cdif0t5v It changes the initialisation order - it's not a problem but hard to review.
- zikohh 4y agoOh wait useful ?! I don't think ordering structs alphabetically is useful I agree that if it's not useful it shouldn't be done and transitively that makes the pull request easier to review. But still a very indirect approach
- gus_massa 4y agoCan it be disabled with an option? If I have an structure with mass, height and width, I'll really hate to order them as height, mass and width. My totally uninformed opinion is to run away from a linter that makes that changes.