-
Notifications
You must be signed in to change notification settings - Fork 889
Conversation
Thanks for your interest in palantir/tslint, @LKay! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
CHANGELOG.md
Outdated
@@ -44,6 +44,10 @@ v5.0.0 | |||
|
|||
--> | |||
|
|||
Unreleased | |||
--- | |||
- [enhancement] New TAP formatter |
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.
no need to modify the changelog. that is done when the next version is released to avoid merge conflicts.
Just add [new-formatter] TAP formatter
to the opening post of the PR.
src/formatters/tapFormatter.ts
Outdated
@@ -0,0 +1,90 @@ | |||
/** | |||
* @license | |||
* Copyright 2013 Palantir Technologies, Inc. |
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.
s/2013/2017/
src/formatters/tapFormatter.ts
Outdated
` failureString: ${failureString}`, | ||
` rawLines: ${failureRaw}`, | ||
" ...", | ||
].join("\n"); |
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.
Just a suggestion: use multiline template strings and Utils.dedent
return Utils.dedent`
not ok ${i + 1} - ${failureMessage}
---
message : ${failureMessage}
severity: ${failureSeverity}
data:
ruleName: ${ruleName}
fileName: ${fileName}
line: ${lineAndCharacter.line}
character: ${lineAndCharacter.character}
failureString: ${failureString}
rawLines: ${failureRaw}
...`;
@LKay thanks! |
PR checklist
Overview of change:
Adds new TAP formatter for failures output. Can be used with any TAP reporter
CHANGELOG.md entry: