Skip to content
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

Consider adding optional revive linters #158

Closed
ccoVeille opened this issue Jun 26, 2024 · 3 comments · Fixed by #164
Closed

Consider adding optional revive linters #158

ccoVeille opened this issue Jun 26, 2024 · 3 comments · Fixed by #164
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ccoVeille
Copy link
Contributor

I noticed than many of the code review I'm doing are about code simplification are about early-return pattern.

I recommend using revive that could detect this pattern. early-return is one we need I think

We may review a few more linters in the process but it would definitely help I think

Originally posted by @ccoVeille in #155 (comment)

@Antonboom Antonboom added enhancement New feature or request good first issue Good for newcomers labels Jun 26, 2024
@mmorel-35
Copy link

mmorel-35 commented Jun 26, 2024

Just something to be aware of when you'll customize revive config in golangci lint config file. As it it is today, the default configuration of revive is used by default. But once you'll want to specify the activation of a rule, you'll need to add explicitly every other rules you want to be activated including the list of the defaults, otherwise you'll have only one active rule.

Please read last paragraph of this section https://github.com/mgechev/revive?tab=readme-ov-file#golangci-lint on revive's GitHub page

@ccoVeille
Copy link
Contributor Author

I know, it's a pain. That's why I started working on a personal project to document such things and provide ready to go golangci-lint configuration files

https://github.com/ccoVeille/golangci-lint-config-examples

I will populate it in the next days

@ccoVeille
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants