Skip to content

Add 'cyclop' linter #1738

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 1 commit into from
Feb 17, 2021
Merged

Add 'cyclop' linter #1738

merged 1 commit into from
Feb 17, 2021

Conversation

bkielbasa
Copy link
Contributor

@bkielbasa bkielbasa commented Feb 16, 2021

@boring-cyborg
Copy link

boring-cyborg bot commented Feb 16, 2021

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Feb 16, 2021

CLA assistant check
All committers have signed the CLA.

@ldez ldez added the linter: new Support new linter label Feb 16, 2021
@ldez ldez self-requested a review February 16, 2021 21:39
@ldez ldez changed the title add cyclop Add 'cyclop' linter Feb 16, 2021
@ldez
Copy link
Member

ldez commented Feb 16, 2021

Hello,

to be able to sign the CLA you have to add the email that you are using inside your GitHub account settings https://github.com/settings/emails

@ldez
Copy link
Member

ldez commented Feb 16, 2021

Could you explain what is for you the difference between your linter the other linters on the same subjects (like gocyclo, funlen, gocognit, ...)?

Otherwise, could you run a go mod tidy

@bkielbasa
Copy link
Contributor Author

Hi @ldez!

Of course :) Firstly, gocognit calculates cognitive complexity which is something a bit different than cyclomatic complexity.
Secondly, the gocyclo is OK but the author seems to not maintain the project a lot. There were pull requests or issues waiting months to merge/review/answer. This is why I created my own. What's more, it's written in the "old fashion way" without the go/analizer package usage.
The funlen checks the length of the function which's something different than the cyclomatic complexity.

I hope I answered your questions! If you have more, don't hesitate to ask :)

@ldez
Copy link
Member

ldez commented Feb 16, 2021

Secondly, the gocyclo is OK but the author seems to not maintain the project a lot. There were pull requests or issues waiting months to merge/review/answer.

https://github.com/fzipp/gocyclo seems maintained, at least there is a lot of commits in the past year. https://github.com/fzipp/gocyclo/commits/main

@golangci golangci deleted a comment from bombsimon Feb 17, 2021
@ldez
Copy link
Member

ldez commented Feb 17, 2021

@bkielbasa could you rebase your PR?

@bkielbasa
Copy link
Contributor Author

@ldez done!

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

@ldez ldez merged commit 2121370 into golangci:master Feb 17, 2021
@golangci-automator
Copy link

Hey, @bkielbasa — 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!

@bkielbasa bkielbasa deleted the add-cyclop branch February 17, 2021 09:56
ashanbrown pushed a commit to ashanbrown/golangci-lint that referenced this pull request Feb 20, 2021
@ldez ldez added this to the v1.37 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.

5 participants