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

exported: currently only support package prefix detection, package suffix could be also useful #1226

Open
ccoVeille opened this issue Feb 8, 2025 · 2 comments
Assignees

Comments

@ccoVeille
Copy link
Contributor

Currently, revive detects this

// Package option comment
package option

// OptionWhatever is prefixed with the package name which is repetitive
func OptionWhatever() {} // MATCH /func name will be used as option.OptionWhatever by other packages, and that is repetitive; consider calling this Whatever/

I would like to detect this

// Package option comment
package option

// WhateverOption is suffixed with the package name which is repetitive
func WhateverOption() {} // MATCH /func name will be used as option.WhateverOption by other packages, and that is repetitive; consider calling this Whatever/

The changes are pretty limited.

But I would like to open the debate. I was surprised to only see that prefix where detected.

@chavacava
Copy link
Collaborator

Hi @ccoVeille thanks for the proposal, Indeed, checking suffixes might be interesting.

@ccoVeille
Copy link
Contributor Author

Please assign it to me. I will handle it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants