-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
initial revision of reachability checks #4788
Changes from 1 commit
b62ef0d
beb1aa3
9aeb0f8
682c14c
69321a0
4711f0e
98ac805
ae175d0
9d24e0f
ca0d580
f0f5a0d
eb04f32
ebfcd25
938dd74
17716fb
bc02341
238e1c6
5532778
7b12617
f9eaed7
f96980d
2779352
7d09f26
d2a11b5
3f11c0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -244,7 +244,27 @@ namespace ts { | |
"classic": ModuleResolutionKind.Classic | ||
}, | ||
description: Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_or_classic_TypeScript_pre_1_6 | ||
} | ||
}, | ||
{ | ||
name: "noUnusedLabels", | ||
type: "boolean", | ||
description: Diagnostics.Report_error_on_unused_labels | ||
}, | ||
{ | ||
name: "noImplicitReturns", | ||
type: "boolean", | ||
description: Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit : Report_errors There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't have a consistent style here. My understanding of phrasing is: 'use this option to do...' but not 'this option does...' so I'd prefer to keep existing version. Probably @JsonFreeman has different opinion. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yuit's comment was about singular vs plural, rather than the mood, if I understood correctly. The mood inconsistency is a different issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JsonFreeman @vladima yep, it is more about the consistency on plural or singular on the word "error". I will be ok either one but I think it is nice to keep them consistent |
||
}, | ||
{ | ||
name: "noFallthroughCasesInSwitch", | ||
type: "boolean", | ||
description: Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement | ||
}, | ||
{ | ||
name: "noUnreachableCode", | ||
type: "boolean", | ||
description: Diagnostics.Report_errors_on_unreachable_code | ||
} | ||
]; | ||
|
||
/* @internal */ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -446,7 +446,7 @@ namespace ts.BreakpointResolver { | |
// fall through. | ||
|
||
case SyntaxKind.CatchClause: | ||
return spanInNode(lastOrUndefined((<Block>node.parent).statements));; | ||
return spanInNode(lastOrUndefined((<Block>node.parent).statements)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hah! Was this reported as unreachable? Awesome. |
||
|
||
case SyntaxKind.CaseBlock: | ||
// breakpoint in last statement of the last clause | ||
|
@@ -493,9 +493,6 @@ namespace ts.BreakpointResolver { | |
default: | ||
return spanInNode(node.parent); | ||
} | ||
|
||
// Default to parent node | ||
return spanInNode(node.parent); | ||
} | ||
|
||
function spanInColonToken(node: Node): TextSpan { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -340,7 +340,6 @@ namespace ts.formatting { | |
return node; | ||
} | ||
} | ||
return node; | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit : Report_errors