Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Don't die when a rule requiring type checking but doesn't have it #2188

Merged
merged 1 commit into from
Feb 8, 2017

Conversation

nchen63
Copy link
Contributor

@nchen63 nchen63 commented Feb 7, 2017

fixes #2169

[bug-fix] Don't exit when a rule requires type checking but type checking is not enabled

@nchen63 nchen63 merged commit 02dd75e into master Feb 8, 2017
@nchen63 nchen63 deleted the non-fatal-type-check branch February 8, 2017 01:48
@ajafff
Copy link
Contributor

ajafff commented Feb 8, 2017

@nchen63 this is not the best solution for the problem. Before this change it was possible to write a Rule that would work both with and without a TypeChecker, see #2091 (comment). This PR broke that behaviour.

Maybe it would have been better to just wrap the call to rule.applyWithProgram() in try ... catch and print exceptions as warning.
When going that route it would also make sense to do the same for rule.apply(). This way linting still works even if a rule crashes.

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

Successfully merging this pull request may close these issues.

Rules that require --type-check should not throw as breaks extends
2 participants