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

Mention file name when a test fails to parse error markers #4381

Closed
JoshuaKGoldberg opened this issue Dec 13, 2018 · 0 comments · Fixed by #4397
Closed

Mention file name when a test fails to parse error markers #4381

JoshuaKGoldberg opened this issue Dec 13, 2018 · 0 comments · Fixed by #4397

Comments

@JoshuaKGoldberg
Copy link
Contributor

Feature request

Is your feature request related to a problem? Please describe.

Error: Bad error marker at {"startCol":0,"endCol":1,"message":"Opening brace cannot be followed by empty line"}
    at Object.printLine (C:\Code\tslint-microsoft-contrib\node_modules\tslint\lib\verify\lines.js:138:23)
    at C:\Code\tslint-microsoft-contrib\node_modules\tslint\lib\verify\parse.js:240:157
    at Object.mapDefined (C:\Code\tslint-microsoft-contrib\node_modules\tslint\lib\utils.js:161:22)
    at C:\Code\tslint-microsoft-contrib\node_modules\tslint\lib\verify\parse.js:240:88
    at Object.flatMap (C:\Code\tslint-microsoft-contrib\node_modules\tslint\lib\utils.js:151:29)
    at Object.createMarkupFromErrors (C:\Code\tslint-microsoft-contrib\node_modules\tslint\lib\verify\parse.js:240:20)
    at _loop_1 (C:\Code\tslint-microsoft-contrib\node_modules\tslint\lib\test.js:157:37)
    at runTest (C:\Code\tslint-microsoft-contrib\node_modules\tslint\lib\test.js:164:9)
    at C:\Code\tslint-microsoft-contrib\node_modules\tslint\lib\test.js:41:52
    at Array.map (<anonymous>)

This doesn't mention which file name is there, so when you've made multiple file changes, it can be annoying to plumb through to find the right one.

Describe the solution you'd like

Error: Bad error marker in tests/no-empty-line-after-opening-brace/test.ts.lint at {"startCol":0,"endCol":1,"message":"Opening brace cannot be followed by empty line"}

Additional context

See failures in this build: https://travis-ci.org/Microsoft/tslint-microsoft-contrib/jobs/463096039 from this PR commit: microsoft/tslint-microsoft-contrib@95d0307

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.