fix(45713) Improve error report summaries (#45742)

* Improve error report summaries (#45713)

* fixup! Improve error report summaries (#45713)

* fixup! fixup! Improve error report summaries (#45713)

* Adds support for handling localization renaming the 'files' header due to localization

* fixup! Adds support for handling localization renaming the 'files' header due to localization

 - Fixed baseline error
 - Fixed linter error

Co-authored-by: Orta <git@orta.io>
Co-authored-by: Orta Therox <ortam@microsoft.com>
This commit is contained in:
Ryan Bargholz 2021-12-07 19:50:44 +09:00 committed by GitHub
parent 305842bd9e
commit 7a12909ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 575 additions and 98 deletions

View File

@ -4156,6 +4156,12 @@
"category": "Message",
"code": 6040
},
"Errors Files": {
"_locale_notes": "There is a double space, and the order cannot be changed (they're table headings) ^",
"category": "Message",
"code": 6041
},
"Generates corresponding '.map' file.": {
"category": "Message",
"code": 6043
@ -4935,6 +4941,18 @@
"category": "Error",
"code": 6258
},
"Found 1 error in {1}": {
"category": "Message",
"code": 6259
},
"Found {0} errors in 1 file.": {
"category": "Message",
"code": 6260
},
"Found {0} errors in {1} files.": {
"category": "Message",
"code": 6261
},
"Directory '{0}' has no containing package.json scope. Imports will not resolve.": {
"category": "Message",

View File

@ -76,7 +76,12 @@ namespace ts {
return fileExtensionIs(fileName, Extension.Dts);
}
export type ReportEmitErrorSummary = (errorCount: number) => void;
export type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void;
export interface ReportFileInError {
fileName: string;
line: number;
}
export interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> {
createDirectory?(path: string): void;
@ -2003,10 +2008,12 @@ namespace ts {
const canReportSummary = state.watch || !!state.host.reportErrorSummary;
const { diagnostics } = state;
let totalErrors = 0;
let filesInError: (ReportFileInError | undefined)[] = [];
if (isCircularBuildOrder(buildOrder)) {
reportBuildQueue(state, buildOrder.buildOrder);
reportErrors(state, buildOrder.circularDiagnostics);
if (canReportSummary) totalErrors += getErrorCountForSummary(buildOrder.circularDiagnostics);
if (canReportSummary) filesInError = [...filesInError, ...getFilesInErrorForSummary(buildOrder.circularDiagnostics)];
}
else {
// Report errors from the other projects
@ -2017,13 +2024,14 @@ namespace ts {
}
});
if (canReportSummary) diagnostics.forEach(singleProjectErrors => totalErrors += getErrorCountForSummary(singleProjectErrors));
if (canReportSummary) diagnostics.forEach(singleProjectErrors => [...filesInError, ...getFilesInErrorForSummary(singleProjectErrors)]);
}
if (state.watch) {
reportWatchStatus(state, getWatchErrorSummaryDiagnosticMessage(totalErrors), totalErrors);
}
else if (state.host.reportErrorSummary) {
state.host.reportErrorSummary(totalErrors);
state.host.reportErrorSummary(totalErrors, filesInError);
}
}

View File

@ -7,7 +7,7 @@ namespace ts {
} : undefined;
/**
* Create a function that reports error by writing to the system and handles the formating of the diagnostic
* Create a function that reports error by writing to the system and handles the formatting of the diagnostic
*/
export function createDiagnosticReporter(system: System, pretty?: boolean): DiagnosticReporter {
const host: FormatDiagnosticsHost = system === sys && sysFormatDiagnosticsHost ? sysFormatDiagnosticsHost : {
@ -101,16 +101,87 @@ namespace ts {
return countWhere(diagnostics, diagnostic => diagnostic.category === DiagnosticCategory.Error);
}
export function getFilesInErrorForSummary(diagnostics: readonly Diagnostic[]): (ReportFileInError | undefined)[] {
const filesInError =
filter(diagnostics, diagnostic => diagnostic.category === DiagnosticCategory.Error)
.map(
errorDiagnostic => {
if(errorDiagnostic.file === undefined) return;
return `${errorDiagnostic.file.fileName}`;
});
return filesInError.map((fileName: string) => {
const diagnosticForFileName = find(diagnostics, diagnostic =>
diagnostic.file !== undefined && diagnostic.file.fileName === fileName
);
if(diagnosticForFileName !== undefined) {
const { line } = getLineAndCharacterOfPosition(diagnosticForFileName.file!, diagnosticForFileName.start!);
return {
fileName,
line: line + 1,
};
}
});
}
export function getWatchErrorSummaryDiagnosticMessage(errorCount: number) {
return errorCount === 1 ?
Diagnostics.Found_1_error_Watching_for_file_changes :
Diagnostics.Found_0_errors_Watching_for_file_changes;
}
export function getErrorSummaryText(errorCount: number, newLine: string) {
export function getErrorSummaryText(
errorCount: number,
filesInError: readonly (ReportFileInError | undefined)[],
newLine: string
) {
if (errorCount === 0) return "";
const d = createCompilerDiagnostic(errorCount === 1 ? Diagnostics.Found_1_error : Diagnostics.Found_0_errors, errorCount);
return `${newLine}${flattenDiagnosticMessageText(d.messageText, newLine)}${newLine}${newLine}`;
const nonNilFiles = filesInError.filter(fileInError => fileInError !== undefined);
const distinctFileNamesWithLines = nonNilFiles.map(fileInError => `${fileInError!.fileName}:${fileInError!.line}`)
.filter((value, index, self) => self.indexOf(value) === index);
const d = errorCount === 1 ?
createCompilerDiagnostic(
filesInError[0] !== undefined ?
Diagnostics.Found_1_error_in_1 :
Diagnostics.Found_1_error,
errorCount,
distinctFileNamesWithLines[0]) :
createCompilerDiagnostic(
distinctFileNamesWithLines.length === 0 ?
Diagnostics.Found_0_errors :
distinctFileNamesWithLines.length === 1 ?
Diagnostics.Found_0_errors_in_1_file :
Diagnostics.Found_0_errors_in_1_files,
errorCount,
distinctFileNamesWithLines.length);
return `${newLine}${flattenDiagnosticMessageText(d.messageText, newLine)}${newLine}${newLine}${errorCount > 1 ? createTabularErrorsDisplay(nonNilFiles) : ""}`;
}
function createTabularErrorsDisplay(filesInError: (ReportFileInError | undefined)[]) {
const distinctFiles = filesInError.filter((value, index, self) => index === self.findIndex(file => file?.fileName === value?.fileName));
if (distinctFiles.length === 0) return "";
const numberLength = (num: number) => Math.log(num) * Math.LOG10E + 1;
const fileToErrorCount = distinctFiles.map(file => ([file, countWhere(filesInError, fileInError => fileInError!.fileName === file!.fileName)] as const));
const maxErrors = fileToErrorCount.reduce((acc, value) => Math.max(acc, value[1] || 0), 0);
const headerRow = Diagnostics.Errors_Files.message;
const leftColumnHeadingLength = headerRow.split(" ")[0].length;
const leftPaddingGoal = Math.max(leftColumnHeadingLength, numberLength(maxErrors));
const headerPadding = Math.max(numberLength(maxErrors) - leftColumnHeadingLength, 0);
let tabularData = "";
tabularData += " ".repeat(headerPadding) + headerRow + "\n";
fileToErrorCount.forEach((row) => {
const [file, errorCount] = row;
const errorCountDigitsLength = Math.log(errorCount) * Math.LOG10E + 1 | 0;
const leftPadding = errorCountDigitsLength < leftPaddingGoal ?
" ".repeat(leftPaddingGoal - errorCountDigitsLength)
: "";
tabularData += `${leftPadding}${errorCount} ${file!.fileName}:${file!.line}\n`;
});
return tabularData;
}
export function isBuilderProgram(program: Program | BuilderProgram): program is BuilderProgram {
@ -350,7 +421,7 @@ namespace ts {
}
if (reportSummary) {
reportSummary(getErrorCountForSummary(diagnostics));
reportSummary(getErrorCountForSummary(diagnostics), getFilesInErrorForSummary(diagnostics));
}
return {
@ -656,7 +727,7 @@ namespace ts {
builderProgram,
input.reportDiagnostic || createDiagnosticReporter(system),
s => host.trace && host.trace(s),
input.reportErrorSummary || input.options.pretty ? errorCount => system.write(getErrorSummaryText(errorCount, system.newLine)) : undefined
input.reportErrorSummary || input.options.pretty ? (errorCount, filesInError) => system.write(getErrorSummaryText(errorCount, filesInError, system.newLine)) : undefined
);
if (input.afterProgramEmitAndDiagnostics) input.afterProgramEmitAndDiagnostics(builderProgram);
return exitStatus;

View File

@ -773,7 +773,7 @@ namespace ts {
function createReportErrorSummary(sys: System, options: CompilerOptions | BuildOptions): ReportEmitErrorSummary | undefined {
return shouldBePretty(sys, options) ?
errorCount => sys.write(getErrorSummaryText(errorCount, sys.newLine)) :
(errorCount, filesInError) => sys.write(getErrorSummaryText(errorCount, filesInError, sys.newLine)) :
undefined;
}

View File

@ -537,7 +537,7 @@ namespace Harness {
outputLines += content;
}
if (pretty) {
outputLines += ts.getErrorSummaryText(ts.getErrorCountForSummary(diagnostics), IO.newLine());
outputLines += ts.getErrorSummaryText(ts.getErrorCountForSummary(diagnostics), ts.getFilesInErrorForSummary(diagnostics), IO.newLine());
}
return outputLines;
}

View File

@ -54,7 +54,7 @@ export function f22() { } // trailing`,
/*createProgram*/ undefined,
createDiagnosticReporter(sys, /*pretty*/ true),
createBuilderStatusReporter(sys, /*pretty*/ true),
errorCount => sys.write(getErrorSummaryText(errorCount, sys.newLine))
(errorCount, filesInError) => sys.write(getErrorSummaryText(errorCount, filesInError, sys.newLine))
);
buildHost.afterProgramEmitAndDiagnostics = cb;
buildHost.afterEmitBundle = cb;

View File

@ -204,13 +204,18 @@ namespace ts.tscWatch {
assert.equal(host.exitCode, expectedExitCode);
}
export function checkNormalBuildErrors(host: WatchedSystem, errors: readonly Diagnostic[] | readonly string[], reportErrorSummary?: boolean) {
export function checkNormalBuildErrors(
host: WatchedSystem,
errors: readonly Diagnostic[] | readonly string[],
files: readonly ReportFileInError[],
reportErrorSummary?: boolean
) {
checkOutputErrors(
host,
[
...map(errors, hostOutputDiagnostic),
...reportErrorSummary ?
[hostOutputWatchDiagnostic(getErrorSummaryText(errors.length, host.newLine))] :
[hostOutputWatchDiagnostic(getErrorSummaryText(errors.length, files, host.newLine))] :
emptyArray
]
);

View File

@ -5352,7 +5352,11 @@ declare namespace ts {
traceResolution?: boolean;
[option: string]: CompilerOptionsValue | undefined;
}
type ReportEmitErrorSummary = (errorCount: number) => void;
type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void;
interface ReportFileInError {
fileName: string;
line: number;
}
interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> {
createDirectory?(path: string): void;
/**

View File

@ -5352,7 +5352,11 @@ declare namespace ts {
traceResolution?: boolean;
[option: string]: CompilerOptionsValue | undefined;
}
type ReportEmitErrorSummary = (errorCount: number) => void;
type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void;
interface ReportFileInError {
fileName: string;
line: number;
}
interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> {
createDirectory?(path: string): void;
/**

View File

@ -65,5 +65,7 @@
}
}
Found 2 errors.
Found 2 errors in 1 file.
Errors Files
2 tests/cases/compiler/deeplyNestedAssignabilityIssue.ts:22

View File

@ -92,5 +92,9 @@
!!! error TS2451: Cannot redeclare block-scoped variable 'Bar'.
!!! related TS6203 tests/cases/compiler/file1.ts:2:7: 'Bar' was also declared here.
Found 6 errors.
Found 6 errors in 3 files.
Errors Files
2 tests/cases/compiler/file1.ts:1
2 tests/cases/compiler/file2.ts:1
2 tests/cases/compiler/file3.ts:1

View File

@ -45,5 +45,8 @@
class H { }
class I { }
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 tests/cases/compiler/file1.ts:1
1 tests/cases/compiler/file2.ts:1

View File

@ -85,5 +85,8 @@
!!! related TS6203 tests/cases/compiler/file1.ts:4:5: 'duplicate3' was also declared here.
}
Found 6 errors.
Found 6 errors in 2 files.
Errors Files
3 tests/cases/compiler/file1.ts:2
3 tests/cases/compiler/file2.ts:2

View File

@ -47,5 +47,8 @@
duplicate8(): number;
}
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 tests/cases/compiler/file1.ts:1
1 tests/cases/compiler/file2.ts:1

View File

@ -92,5 +92,8 @@
}
export {}
Found 6 errors.
Found 6 errors in 2 files.
Errors Files
3 tests/cases/compiler/file1.ts:3
3 tests/cases/compiler/file2.ts:4

View File

@ -92,5 +92,8 @@
!!! related TS6203 tests/cases/compiler/file2.ts:7:9: 'duplicate3' was also declared here.
}
}
Found 6 errors.
Found 6 errors in 2 files.
Errors Files
3 tests/cases/compiler/file1.ts:3
3 tests/cases/compiler/file2.ts:5

View File

@ -56,5 +56,8 @@
duplicate9: () => string;
}
}
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 tests/cases/compiler/file1.ts:1
1 tests/cases/compiler/file2.ts:3

View File

@ -23,5 +23,5 @@
!!! error TS2345: Type '{ default: () => void; }' provides no match for the signature '(): void'.
!!! related TS7038 tests/cases/compiler/index.ts:1:1: Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.
Found 1 error.
Found 1 error in tests/cases/compiler/index.ts:3

View File

@ -0,0 +1,144 @@
tests/cases/compiler/a.ts:1:11 - error TS1109: Expression expected.
1 const a =!@#!@$
   ~
tests/cases/compiler/a.ts:1:12 - error TS18026: '#!' can only be used at the start of a file.
1 const a =!@#!@$
   
tests/cases/compiler/a.ts:1:14 - error TS1109: Expression expected.
1 const a =!@#!@$
   ~
tests/cases/compiler/a.ts:2:12 - error TS1109: Expression expected.
2 const b = !@#!@#!@#!
   ~
tests/cases/compiler/a.ts:2:13 - error TS18026: '#!' can only be used at the start of a file.
2 const b = !@#!@#!@#!
   
tests/cases/compiler/a.ts:2:15 - error TS1109: Expression expected.
2 const b = !@#!@#!@#!
   ~
tests/cases/compiler/a.ts:2:16 - error TS18026: '#!' can only be used at the start of a file.
2 const b = !@#!@#!@#!
   
tests/cases/compiler/a.ts:2:18 - error TS1109: Expression expected.
2 const b = !@#!@#!@#!
   ~
tests/cases/compiler/a.ts:2:19 - error TS18026: '#!' can only be used at the start of a file.
2 const b = !@#!@#!@#!
   
tests/cases/compiler/a.ts:3:1 - error TS2304: Cannot find name 'OK'.
3 OK!
  ~~
tests/cases/compiler/a.ts:4:1 - error TS1434: Unexpected keyword or identifier.
4 HERE's A shouty thing
  ~~~~
tests/cases/compiler/a.ts:4:1 - error TS2304: Cannot find name 'HERE'.
4 HERE's A shouty thing
  ~~~~
tests/cases/compiler/a.ts:4:22 - error TS1002: Unterminated string literal.
4 HERE's A shouty thing
   
tests/cases/compiler/a.ts:5:1 - error TS1434: Unexpected keyword or identifier.
5 GOTTA GO FAST
  ~~~~~
tests/cases/compiler/a.ts:5:1 - error TS2304: Cannot find name 'GOTTA'.
5 GOTTA GO FAST
  ~~~~~
tests/cases/compiler/a.ts:5:7 - error TS1434: Unexpected keyword or identifier.
5 GOTTA GO FAST
   ~~
tests/cases/compiler/a.ts:5:7 - error TS2304: Cannot find name 'GO'.
5 GOTTA GO FAST
   ~~
tests/cases/compiler/a.ts:5:10 - error TS2304: Cannot find name 'FAST'.
5 GOTTA GO FAST
   ~~~~
tests/cases/compiler/b.ts:1:1 - error TS2304: Cannot find name 'fhqwhgads'.
1 fhqwhgads
  ~~~~~~~~~
tests/cases/compiler/b.ts:2:1 - error TS2304: Cannot find name 'to'.
2 to
  ~~
tests/cases/compiler/b.ts:3:1 - error TS2304: Cannot find name 'limit'.
3 limit
  ~~~~~
==== tests/cases/compiler/a.ts (18 errors) ====
const a =!@#!@$
~
!!! error TS1109: Expression expected.
!!! error TS18026: '#!' can only be used at the start of a file.
~
!!! error TS1109: Expression expected.
const b = !@#!@#!@#!
~
!!! error TS1109: Expression expected.
!!! error TS18026: '#!' can only be used at the start of a file.
~
!!! error TS1109: Expression expected.
!!! error TS18026: '#!' can only be used at the start of a file.
~
!!! error TS1109: Expression expected.
!!! error TS18026: '#!' can only be used at the start of a file.
OK!
~~
!!! error TS2304: Cannot find name 'OK'.
HERE's A shouty thing
~~~~
!!! error TS1434: Unexpected keyword or identifier.
~~~~
!!! error TS2304: Cannot find name 'HERE'.
!!! error TS1002: Unterminated string literal.
GOTTA GO FAST
~~~~~
!!! error TS1434: Unexpected keyword or identifier.
~~~~~
!!! error TS2304: Cannot find name 'GOTTA'.
~~
!!! error TS1434: Unexpected keyword or identifier.
~~
!!! error TS2304: Cannot find name 'GO'.
~~~~
!!! error TS2304: Cannot find name 'FAST'.
==== tests/cases/compiler/b.ts (3 errors) ====
fhqwhgads
~~~~~~~~~
!!! error TS2304: Cannot find name 'fhqwhgads'.
to
~~
!!! error TS2304: Cannot find name 'to'.
limit
~~~~~
!!! error TS2304: Cannot find name 'limit'.
Found 21 errors in 2 files.
Errors Files
18 tests/cases/compiler/a.ts:1
3 tests/cases/compiler/b.ts:1

View File

@ -0,0 +1,30 @@
//// [tests/cases/compiler/manyCompilerErrorsInTheTwoFiles.ts] ////
//// [a.ts]
const a =!@#!@$
const b = !@#!@#!@#!
OK!
HERE's A shouty thing
GOTTA GO FAST
//// [b.ts]
fhqwhgads
to
limit
//// [a.js]
var a = !;
!;
var b = !;
!;
!;
!OK;
HERE;
's A shouty thing;
GOTTA;
GO;
FAST;
//// [b.js]
fhqwhgads;
to;
limit;

View File

@ -0,0 +1,16 @@
=== tests/cases/compiler/a.ts ===
const a =!@#!@$
>a : Symbol(a, Decl(a.ts, 0, 5))
const b = !@#!@#!@#!
>b : Symbol(b, Decl(a.ts, 1, 5))
OK!
HERE's A shouty thing
GOTTA GO FAST
=== tests/cases/compiler/b.ts ===
fhqwhgads
No type information for this code.to
No type information for this code.limit
No type information for this code.

View File

@ -0,0 +1,46 @@
=== tests/cases/compiler/a.ts ===
const a =!@#!@$
>a : boolean
>! : boolean
> : any
> : any
>! : boolean
> : any
>$ : any
const b = !@#!@#!@#!
>b : boolean
>! : boolean
> : any
> : any
>! : boolean
> : any
> : any
>! : boolean
> : any
> : any
>!OK! : boolean
OK!
>OK! : any
>OK : any
HERE's A shouty thing
>HERE : any
>'s A shouty thing : "s A shouty thing"
GOTTA GO FAST
>GOTTA : any
>GO : any
>FAST : any
=== tests/cases/compiler/b.ts ===
fhqwhgads
>fhqwhgads : any
to
>to : any
limit
>limit : any

View File

@ -21,5 +21,5 @@
!!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ c: string; }'.
};
Found 1 error.
Found 1 error in tests/cases/compiler/multiLineContextDiagnosticWithPretty.ts:2

View File

@ -15,5 +15,5 @@
!!! error TS1005: '}' expected.
!!! related TS1007 tests/cases/compiler/index.ts:1:11: The parser expected to find a '}' to match the '{' token here.
Found 1 error.
Found 1 error in tests/cases/compiler/index.ts:2

View File

@ -26,5 +26,7 @@
!!! error TS2322: Type 'number' is not assignable to type 'string'.
}
}
Found 3 errors.
Found 3 errors in 1 file.
Errors Files
3 tests/cases/compiler/prettyFileWithErrorsAndTabs.ts:3

View File

@ -40,7 +40,7 @@ Output::
   ~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in src/project/tsconfig.json:6
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -78,7 +78,7 @@ pkg3/src/keys.ts
pkg3/src/index.ts
Matched by include pattern '**/*' in 'pkg3/tsconfig.json'
Found 1 error.
Found 1 error in /user/username/projects/myproject/pkg3/src/keys.ts:2

View File

@ -78,7 +78,7 @@ pkg3/src/keys.ts
pkg3/src/index.ts
Matched by include pattern '**/*' in 'pkg3/tsconfig.json'
Found 1 error.
Found 1 error in /user/username/projects/myproject/pkg3/src/keys.ts:2

View File

@ -54,7 +54,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -310,8 +310,11 @@ Output::
'prop1' is declared here.
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -497,7 +500,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -631,7 +634,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -672,7 +675,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -716,8 +719,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -929,8 +936,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -963,8 +974,11 @@ Output::
'prop1' is declared here.
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
@ -997,8 +1011,11 @@ Output::
'prop1' is declared here.
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
@ -1036,8 +1053,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -1196,7 +1217,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -1367,7 +1388,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -54,7 +54,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -310,8 +310,11 @@ Output::
'prop1' is declared here.
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -497,7 +500,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -631,7 +634,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -672,7 +675,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -716,8 +719,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -929,8 +936,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -963,8 +974,11 @@ Output::
'prop1' is declared here.
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
@ -997,8 +1011,11 @@ Output::
'prop1' is declared here.
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
@ -1036,8 +1053,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -1196,7 +1217,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -1367,7 +1388,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -54,7 +54,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -278,8 +278,11 @@ Output::
'prop1' is declared here.
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -462,7 +465,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -589,7 +592,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -630,7 +633,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -674,8 +677,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -875,8 +882,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -909,8 +920,11 @@ Output::
'prop1' is declared here.
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
@ -943,8 +957,11 @@ Output::
'prop1' is declared here.
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
@ -982,8 +999,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -1131,7 +1152,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -1290,7 +1311,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -198,7 +198,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -437,8 +437,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -767,7 +771,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -198,7 +198,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -437,8 +437,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -767,7 +771,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -195,7 +195,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -402,8 +402,12 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 3 errors.
Found 3 errors in 3 files.
Errors Files
1 /src/project/src/directUse.ts:2
1 /src/project/src/indirectUse.ts:2
1 /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
@ -709,7 +713,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/noChangeFileWithEmitSpecificError.ts:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -47,8 +47,11 @@ Output::
   ~~~~~~~~~~~~~~~~~
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/anotherFileWithSameReferenes.ts:2
1 /src/project/src/main.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
Program root files: ["/src/project/src/anotherFileWithSameReferenes.ts","/src/project/src/filePresent.ts","/src/project/src/main.ts"]
Program options: {"composite":true,"project":"/src/project","configFilePath":"/src/project/tsconfig.json"}
@ -196,8 +199,11 @@ Output::
   ~~~~~~~~~~~~~~~~~
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/anotherFileWithSameReferenes.ts:2
1 /src/project/src/main.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
Program root files: ["/src/project/src/anotherFileWithSameReferenes.ts","/src/project/src/filePresent.ts","/src/project/src/main.ts"]
Program options: {"composite":true,"project":"/src/project","configFilePath":"/src/project/tsconfig.json"}
@ -238,8 +244,11 @@ Output::
   ~~~~~~~~~~~~~~~~~
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/anotherFileWithSameReferenes.ts:2
1 /src/project/src/main.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
Program root files: ["/src/project/src/anotherFileWithSameReferenes.ts","/src/project/src/filePresent.ts","/src/project/src/main.ts"]
Program options: {"composite":true,"project":"/src/project","configFilePath":"/src/project/tsconfig.json"}
@ -365,8 +374,11 @@ Output::
   ~~~~~~~~~~~~~~~~~
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/anotherFileWithSameReferenes.ts:2
1 /src/project/src/main.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
Program root files: ["/src/project/src/anotherFileWithSameReferenes.ts","/src/project/src/filePresent.ts","/src/project/src/main.ts"]
Program options: {"composite":true,"project":"/src/project","configFilePath":"/src/project/tsconfig.json"}
@ -488,8 +500,11 @@ Output::
   ~~~~~~~~~~~~~~~~~
Found 2 errors.
Found 2 errors in 2 files.
Errors Files
1 /src/project/src/anotherFileWithSameReferenes.ts:2
1 /src/project/src/main.ts:3
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
Program root files: ["/src/project/src/anotherFileWithSameReferenes.ts","/src/project/src/filePresent.ts","/src/project/src/main.ts","/src/project/src/newFile.ts"]
Program options: {"composite":true,"project":"/src/project","configFilePath":"/src/project/tsconfig.json"}

View File

@ -46,7 +46,7 @@ Output::
   ~
Found 1 error.
Found 1 error in /src/src/main.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
Program root files: ["/src/shared/types/db.ts","/src/src/main.ts","/src/src/other.ts"]
@ -172,7 +172,7 @@ Output::
   ~
Found 1 error.
Found 1 error in /src/src/main.ts:2
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
Program root files: ["/src/shared/types/db.ts","/src/src/main.ts","/src/src/other.ts"]

View File

@ -53,7 +53,7 @@ Output::
The parser expected to find a '}' to match the '{' token here.
Found 1 error.
Found 1 error in /src/src/main.ts:4
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
Program root files: ["/src/shared/types/db.ts","/src/src/main.ts","/src/src/other.ts"]
@ -172,7 +172,7 @@ Output::
The parser expected to find a '}' to match the '{' token here.
Found 1 error.
Found 1 error in /src/src/main.ts:4
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
Program root files: ["/src/shared/types/db.ts","/src/src/main.ts","/src/src/other.ts"]

View File

@ -30,7 +30,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in src/project/tsconfig.json:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -36,7 +36,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in src/project/tsconfig.json:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -47,7 +47,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /src/project/src/index.tsx:1
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated

View File

@ -154,7 +154,7 @@ Output::
   ~~~
Found 1 error.
Found 1 error in /users/username/projects/project/src/index.ts:1

View File

@ -133,7 +133,7 @@ Output::
   ~~~~~
Found 1 error.
Found 1 error in /users/username/projects/project/index.tsx:1

View File

@ -29,7 +29,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /users/username/projects/project/index.tsx:1

View File

@ -147,7 +147,7 @@ Output::
   ~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
Found 1 error in /users/username/projects/project/index.tsx:1

View File

@ -178,7 +178,7 @@ node_modules/preact/jsx-runtime/index.d.ts
index.tsx
Matched by include pattern '**/*' in 'tsconfig.json'
Found 1 error.
Found 1 error in /users/username/projects/project/index.tsx:1

View File

@ -30,7 +30,7 @@ Output::
   ~
Found 1 error.
Found 1 error in /users/username/projects/project/file2.ts:1
@ -146,7 +146,7 @@ Output::
   ~
Found 1 error.
Found 1 error in /users/username/projects/project/file2.ts:1

View File

@ -30,7 +30,7 @@ Output::
   ~
Found 1 error.
Found 1 error in /users/username/projects/project/file2.ts:1
@ -135,7 +135,7 @@ Output::
   ~
Found 1 error.
Found 1 error in /users/username/projects/project/file2.ts:1

View File

@ -111,7 +111,7 @@ Output::
   ~~~~~~
Found 1 error.
Found 1 error in /users/username/projects/project/index.ts:1

View File

@ -56,5 +56,8 @@
!!! error TS2451: Cannot redeclare block-scoped variable 'Bar'.
!!! related TS6203 tests/cases/conformance/jsdoc/mod1.js:2:7: 'Bar' was also declared here.
Found 4 errors.
Found 4 errors in 2 files.
Errors Files
2 tests/cases/conformance/jsdoc/mod1.js:1
2 tests/cases/conformance/jsdoc/mod2.js:1

View File

@ -0,0 +1,12 @@
// @pretty: true
// @filename: a.ts
const a =!@#!@$
const b = !@#!@#!@#!
OK!
HERE's A shouty thing
GOTTA GO FAST
// @filename: b.ts
fhqwhgads
to
limit