From fe9e3709948460540b27df368789541d870dd7da Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Tue, 22 May 2018 08:03:21 -0700 Subject: [PATCH 1/2] Update descriptions of --allowUnusedLabels and --allowUnreachableCode --- src/compiler/commandLineParser.ts | 4 ++-- src/compiler/diagnosticMessages.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 8b963409ab6ad..a1b5d602cab45 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -648,13 +648,13 @@ namespace ts { name: "allowUnusedLabels", type: "boolean", category: Diagnostics.Advanced_Options, - description: Diagnostics.Do_not_report_errors_on_unused_labels + description: Diagnostics.Controls_showing_errors_for_unused_labels_true_Colon_Always_false_Colon_Never_unspecified_Colon_Not_on_command_line_but_in_editor, }, { name: "allowUnreachableCode", type: "boolean", category: Diagnostics.Advanced_Options, - description: Diagnostics.Do_not_report_errors_on_unreachable_code + description: Diagnostics.Controls_showing_errors_for_unreachable_code_true_Colon_Always_false_Colon_Never_unspecified_Colon_Not_on_command_line_but_in_editor, }, { name: "suppressExcessPropertyErrors", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 59007e610b4ad..93a24c17b9198 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3060,7 +3060,7 @@ "category": "Message", "code": 6073 }, - "Do not report errors on unused labels.": { + "Controls showing errors for unused labels. 'true': Always; 'false': Never; unspecified: Not on command line, but in editor.": { "category": "Message", "code": 6074 }, @@ -3072,7 +3072,7 @@ "category": "Message", "code": 6076 }, - "Do not report errors on unreachable code.": { + "Controls showing errors for unreachable code. 'true': Always; 'false': Never; unspecified: Not on command line, but in editor.": { "category": "Message", "code": 6077 }, From a949cdc0bd73df5bbbb47fcc893c373fdc543ba2 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 5 Sep 2018 11:31:56 -0700 Subject: [PATCH 2/2] Fix inverted meaning: "-- allowUnusedLabels true" means never show errors --- src/compiler/commandLineParser.ts | 4 ++-- src/compiler/diagnosticMessages.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 954e54933ac18..6f1d633eadaff 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -697,14 +697,14 @@ namespace ts { type: "boolean", affectsSemanticDiagnostics: true, category: Diagnostics.Advanced_Options, - description: Diagnostics.Controls_showing_errors_for_unused_labels_true_Colon_Always_false_Colon_Never_unspecified_Colon_Not_on_command_line_but_in_editor, + description: Diagnostics.Controls_showing_errors_for_unused_labels_true_Colon_Never_show_errors_false_Colon_Always_show_errors_unspecified_Colon_Show_errors_in_editor_but_not_command_line, }, { name: "allowUnreachableCode", type: "boolean", affectsSemanticDiagnostics: true, category: Diagnostics.Advanced_Options, - description: Diagnostics.Controls_showing_errors_for_unreachable_code_true_Colon_Always_false_Colon_Never_unspecified_Colon_Not_on_command_line_but_in_editor, + description: Diagnostics.Controls_showing_errors_for_unreachable_code_true_Colon_Never_show_errors_false_Colon_Always_show_errors_unspecified_Colon_Show_errors_in_editor_but_not_command_line, }, { name: "suppressExcessPropertyErrors", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 8648268f97236..844c0973d78cf 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3150,7 +3150,7 @@ "category": "Message", "code": 6073 }, - "Controls showing errors for unused labels. 'true': Always; 'false': Never; unspecified: Not on command line, but in editor.": { + "Controls showing errors for unused labels. 'true': Never show errors; 'false': Always show errors; unspecified: Show errors in editor, but not command line.": { "category": "Message", "code": 6074 }, @@ -3162,7 +3162,7 @@ "category": "Message", "code": 6076 }, - "Controls showing errors for unreachable code. 'true': Always; 'false': Never; unspecified: Not on command line, but in editor.": { + "Controls showing errors for unreachable code. 'true': Never show errors; 'false': Always show errors; unspecified: Show errors in editor, but not command line.": { "category": "Message", "code": 6077 },