-
Notifications
You must be signed in to change notification settings - Fork 43
wsl
v5 - a complete rewrite ✍️
#169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@ldez Feel free to give input on this PR. I don't expect any feedback but you mentioned you had some thoughts and/or opinions and I gladly hear them all! Especially anything that affects I'm not in a rush merging this so don't stress getting to this and again, I'm not expecting anything so this is more if you had any interest! |
I will review it tomorrow. |
I'm still on the topic, but this interrogating me on a larger topic of major versions of linters. |
No need to say sorry and no rush, I see you're active every day and with more important topics! If you feel this adds complex scope to Take your time and we'll see if/when you get to this! |
I never really liked how the code turned out. In fact, I really don't like it. It's hard to follow, huge scopes, weird names. When I did the initial diagnostic messages I barely knew about the AST and different types and I never tested the code on real big projects.
Back in 2023 I removed all the code and started from scratch, didn't really know what to expect. I did some POC starting with the
wsl
foundation and empty leading and trailing whitespaces. I then picked this up again sometime 2024 and did tiny pieces here and there. In 2025 I started to get back to this more regularly although still with a slow pace.I'm now at a place where I think I've covered all use-cases and all configuration and intentions. I think the code is easier to maintain and hopefully it will be easier to change as well. From a user perspective, the important changes are:
if
statements? Turn them off! Only care aboutreturn
andbranch
? Just enable those! Pluswsl
specific checks that was previously unique bools like strict append. In fact, you can now disable all checks and get no diagnostics at all.defer
hacks.send
or complex values assigned to declarations.The only considerations left as of now is:
AllowAssignAndCallCuddle
be kept and converted toCheckAssignExpr
? (see e2fee7d)golangci-lint
users?