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

Whitelist for trivial accessors #421

Closed
markijbema opened this issue Aug 9, 2013 · 1 comment · Fixed by #422
Closed

Whitelist for trivial accessors #421

markijbema opened this issue Aug 9, 2013 · 1 comment · Fixed by #422

Comments

@markijbema
Copy link
Contributor

I think it would be helpful if one could define a whitelist for the trivial accessors cop. for instance the following methods typically aren't accessors: to_hash, to_s. I think we could add some of those default methods to the whitelist by default, but for instance a software package (in this case I'm trying rubocop on discourses oneboxes) might define similar methods (in this case to_html), so a whitelist would be really helpful.

This problem is partly addressed by the same name option, but I think with a whitelist you can keep rubocop stricter, while allowing these few methods.

@markijbema
Copy link
Contributor Author

(looks like a simple enough fix, creating a pull request)

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

Successfully merging a pull request may close this issue.

1 participant