From 91fedf4df197689510c1134201e1ff50a5be56d0 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 4 May 2015 13:21:39 -0700 Subject: [PATCH] Update description message and variable names --- src/compiler/commandLineParser.ts | 7 +++++-- src/compiler/diagnosticInformationMap.generated.ts | 4 ++-- src/compiler/diagnosticMessages.json | 4 ++-- src/compiler/program.ts | 10 +++++----- src/harness/harness.ts | 10 +++++----- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index bdf42d6011a..6a055aebf6a 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -68,8 +68,11 @@ module ts { }, { name: "newLine", - type: { "crlf": NewLineKind.CarriageReturnLineFeed, "lf": NewLineKind.LineFeed }, - description: Diagnostics.Emit_newline_Colon_CRLF_dos_or_LF_unix, + type: { + "crlf": NewLineKind.CarriageReturnLineFeed, + "lf": NewLineKind.LineFeed + }, + description: Diagnostics.Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix, paramType: Diagnostics.NEWLINE, error: Diagnostics.Argument_for_newLine_option_must_be_CRLF_or_LF }, diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index ea4c21e54b0..14163e81195 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -502,9 +502,9 @@ module ts { Preserve_new_lines_when_emitting_code: { code: 6057, category: DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." }, Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." }, File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." }, - Emit_newline_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: DiagnosticCategory.Message, key: "Emit newline: 'CRLF' (dos) or 'LF' (unix)." }, + Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: DiagnosticCategory.Message, key: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." }, NEWLINE: { code: 6061, category: DiagnosticCategory.Message, key: "NEWLINE" }, - Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: DiagnosticCategory.Error, key: "Argument for 'newLine' option must be 'CRLF' or 'LF'." }, + Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index e74603f2bac..18c98928dda 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1998,7 +1998,7 @@ "category": "Error", "code": 6059 }, - "Emit newline: 'CRLF' (dos) or 'LF' (unix).": { + "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).": { "category": "Message", "code": 6060 }, @@ -2006,7 +2006,7 @@ "category": "Message", "code": 6061 }, - "Argument for 'newLine' option must be 'CRLF' or 'LF'.": { + "Argument for '--newLine' option must be 'CRLF' or 'LF'.": { "category": "Error", "code": 6062 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 96e1773172b..3ebd8740faa 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -9,9 +9,9 @@ module ts { /** The version of the TypeScript compiler release */ export const version = "1.5.0"; - - const NEWLINE_CRLF = "\r\n"; - const NEWLINE_LF = "\n"; + + const carriageReturnLineFeed = "\r\n"; + const lineFeed = "\n"; export function findConfigFile(searchPath: string): string { var fileName = "tsconfig.json"; @@ -95,8 +95,8 @@ module ts { } let newLine = - options.newLine === NewLineKind.CarriageReturnLineFeed ? NEWLINE_CRLF : - options.newLine === NewLineKind.LineFeed ? NEWLINE_LF : + options.newLine === NewLineKind.CarriageReturnLineFeed ? carriageReturnLineFeed : + options.newLine === NewLineKind.LineFeed ? lineFeed : sys.newLine; return { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 60a508e8625..8e1bdbf07ee 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -805,8 +805,8 @@ module Harness { return result; } - const NEWLINE_CRLF = "\r\n"; - const NEWLINE_LF = "\n"; + const carriageReturnLineFeed = "\r\n"; + const lineFeed = "\n"; export var defaultLibFileName = 'lib.d.ts'; export var defaultLibSourceFile = createSourceFileAndAssertInvariants(defaultLibFileName, IO.readFile(libFolder + 'lib.core.d.ts'), /*languageVersion*/ ts.ScriptTarget.Latest); @@ -846,9 +846,9 @@ module Harness { inputFiles.forEach(register); let newLine = - newLineKind === ts.NewLineKind.CarriageReturnLineFeed ? NEWLINE_CRLF : - newLineKind === ts.NewLineKind.LineFeed ? NEWLINE_LF : - ts.sys.newLine; + newLineKind === ts.NewLineKind.CarriageReturnLineFeed ? carriageReturnLineFeed : + newLineKind === ts.NewLineKind.LineFeed ? lineFeed : + ts.sys.newLine; return { getCurrentDirectory,