MarioCarrion / nit

Opinionated code organization linter for Go projects.
MIT License
19 stars 0 forks source link

Autofix feature? #1

Open StevenACoffman opened 3 years ago

StevenACoffman commented 3 years ago

Thanks! This is very useful, as is.

I know it is more work, but we have found that linters really shine when they are not only able to point out irritating inconsistencies, but also to autofix them when they can be unambiguously and purely mechanically applied. (For instance, we love gofumpt -w -s ).

MarioCarrion commented 2 years ago

Wow! I never received a notification about this issue 😞 .

Anyways, Yes! One of my goals (one day) is to add support for something like you mentioned, and maybe revisit the opinionated way I decided to use for the sections.

StevenACoffman commented 2 years ago

@MarioCarrion No worries. So right now I use:

I am not aware of a tool that automatically rearranges the function order in the source code. It's kind of a pain to have nit warn about the order, but not just have an autofix option.