wsl
wsl copied to clipboard
Rewrite source input
Hello!
For example, I have a huge project with thousands lines of source and now I'd like to automate application of the strict spacing rules provided by wsl, instead of hours of manual routine work.
Are there any tips for rewriting input files? If currently not, it could be a great idea because some other alike tools provide such functionality, e.g. gofumpt, goimports.
Regards
Hi, thanks for the issue!
This is one of those tings that's keeping me up at night. It was definitely the plan to add a fixer for this project and a lot of people have asked for it. I created #4 myself back when the repo was new and in February i opened #72. A few things made me stop the progress
- It's scary and dangerous to change other peoples code - I want it to be 100%
- It's hard to consider comments when doing this kind of things - I got stuck regarding removing whitespaces for this sake. I didn't want to release a fixer that does half the job (just adds the newlines). Since
whitespace
and alsogufumpt
I think can remove leading and trailing whitespaces I started considering removing that part from my code which is some of the worst code. - I wanted to rewrite the parser of the code while doing this to make future maintenance easier which added a too big scope to the task
- I just have less time than I thought to put in to this.
I would love to actually finish this up, by myself or with help from contributors, but knowing this PR is more than 6 months old I'm thinking just as much of removing this from golangci-lint
as actually fixing it.
So TL;DR: I would love to provide a 100% working fixer for all the reported errors and the PR took me quite far having support to add newlines where warned. I just never finished it.
Closing in favour of #4