Skip to content

new nlreturn linter #1267

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

Merged
merged 3 commits into from
Aug 2, 2020
Merged

new nlreturn linter #1267

merged 3 commits into from
Aug 2, 2020

Conversation

ssgreg
Copy link
Contributor

@ssgreg ssgreg commented Jul 24, 2020

Add nlreturn linter.
https://github.com/ssgreg/nlreturn

@boring-cyborg
Copy link

boring-cyborg bot commented Jul 24, 2020

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Jul 24, 2020

CLA assistant check
All committers have signed the CLA.

@julienschmidt
Copy link

Does this differ from https://github.com/bombsimon/wsl or is it simply a subset of the rules enforced by wsl?

@ssgreg
Copy link
Contributor Author

ssgreg commented Jul 28, 2020

Does this differ from https://github.com/bombsimon/wsl or is it simply a subset of the rules enforced by wsl?

WSL is too strict linter. We tried to add more configurable options but author did not accept our changes and suggested to make an alternative implementation saying that WSL was started as a joke.
bombsimon/wsl#89

We think that empty lines are really matter before return and branch statements. They greatly improve code readability. Besides that we're open to add any other configurable WSL like checks if anyone need them.

@bombsimon
Copy link
Member

I think it's fine to have overlapping linters in golangci-lint so I see no reason not to merge this. It's a huge difference between WSL and this linter just like the difference between WSL and whitespace which is also overlapping. The same goes for gofumpt regarding empty lines, grouping var etc.

I just wanted to say that I very much appreciate changes and the PR never got merge since I never got any response to my questions or proposals on how to use keep development of WSL. And to be clear, it's no longer a joke but something I want to be useful. I just don't think configuring a linter to turn of all checks is the right way to go so again, I think this will be a good contribution to golangci-lint.

I'll approve this but I will let someone else from @golangci/team merge this so we agree with each other.

@SVilgelm
Copy link
Member

SVilgelm commented Aug 2, 2020

IMO if it's not possible to achieve same result with other linters, then I don't see any reasons to not merge it

Copy link
Member

@SVilgelm SVilgelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SVilgelm
Copy link
Member

SVilgelm commented Aug 2, 2020

@ssgreg Could please resolve conflicts and we will merge it

@SVilgelm SVilgelm merged commit 6b60cb8 into golangci:master Aug 2, 2020
@golangci-automator
Copy link

Hey, @ssgreg — we just merged your PR to golangci-lint! 🔥🚀

golangci-lint is built by awesome people like you. Let us say “thanks”: we just invited you to join the GolangCI organization on GitHub.
This will add you to our team of maintainers. Accept the invite by visiting this link.

By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.
More information about contributing is here.

Thanks again!

@ldez ldez added the linter: new Support new linter label Dec 7, 2020
@ldez ldez added this to the v1.30 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter: new Support new linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants