-
Notifications
You must be signed in to change notification settings - Fork 608
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
lint: limit max return values from a function to 4 #5984
Comments
These examples need fixing prior to adding the linter:
|
Started adding linter on this branch: https://github.com/osmosis-labs/osmosis/tree/roman/max-return-linter |
We should be able to have automated tooling to do these fixes as well |
Can revive automatically fix these out of curiosity? |
I was unable to find such an option. I think it would require some more complex edge case handling, something AST-like. From doing this manually, I think it's hard to construct a deterministic set of rules that would apply to every usage of the function being refactored. |
Background
See an example of where this has grown out of control and was later fixed:
#5983
To prevent so many return values causing decrease in readability, we should add a linter
Acceptance Criteria
CONTRIBUTING.md
The text was updated successfully, but these errors were encountered: