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

Add fixer for return-never-call #160

Open
ajafff opened this issue Mar 29, 2018 · 1 comment
Open

Add fixer for return-never-call #160

ajafff opened this issue Mar 29, 2018 · 1 comment

Comments

@ajafff
Copy link
Member

ajafff commented Mar 29, 2018

Implement an autofixer for return-never-call (#159).

It should only add throw or return if there are no executable statements after the failing statement. That's necessary to avoid breaking people's build by making code unreachable. To be fair the code is already unreachable but not detected by the compiler.

This needs some control flow analysis to track if any statement is executed after the current one.

@ajafff
Copy link
Member Author

ajafff commented Jul 2, 2018

instead of providing an autofix that requires a control flow graph, this rule could provide a CodeAction (#316) to fix this issue.

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

1 participant