nlreturn icon indicating copy to clipboard operation
nlreturn copied to clipboard

Implement autofix

Open remyleone opened this issue 1 year ago • 4 comments

We got very large code base and doing it by hand seems long. Could you implement auto fix for this linter?

remyleone avatar Aug 22 '24 12:08 remyleone

@remyleone great idea. Would you be able to propose a PR?

kersten avatar Sep 24 '24 10:09 kersten

I have no experience in writing linters and auto fix features.

remyleone avatar Sep 24 '24 11:09 remyleone

@remyleone a colleague just found out that nlreturn has an autofix feature already. If you are using it with golang-lint it's not working, because they have implemented their own solution, which is not compatible with nlreturn. There is already an issue for it: https://github.com/golangci/golangci-lint/issues/1779

kersten avatar Sep 26 '24 12:09 kersten

It looks like golangci-lint v1.63.0 includes support for auto fix (--fix) that is compatible with nlreturn (via PR 5232).

In my limited testing, it seems to be working as expected.

pierow2k avatar Feb 07 '25 16:02 pierow2k