go-template icon indicating copy to clipboard operation
go-template copied to clipboard

[feature] Add WSL as a make target, to apply fixes automatically

Open zalgonoise opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Our linter configuration is not performing any automatic actions that could improve the quality of life of the SWE

Describe the solution you'd like

Adding wsl as a make target so that we can auto-fix WSL-related warnings, reducing to a great extent the linter warning messages.

Describe alternatives you've considered

we can install and execute wsl in a make target: https://github.com/bombsimon/wsl?tab=readme-ov-file#usage

Search

  • [X] I did search for other open and closed issues before opening this.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Additional context

No response

zalgonoise avatar Apr 11 '24 09:04 zalgonoise

How about running the make target in a pre-commit hook too?

MarvinJWendt avatar Apr 11 '24 20:04 MarvinJWendt

Since it applies changes to the code with the --fix flag, I thought the caller should execute the make target beforehand (even if just adding newlines) :D

It should be OK to add it to git pre-commit hooks, but how would one deal with the changes? Should the script also commit the files? Or exit with status code 1 and let the caller deal with the commits?

zalgonoise avatar Apr 11 '24 20:04 zalgonoise