Skip to content

Commit

Permalink
Update markdownlint.js
Browse files Browse the repository at this point in the history
  • Loading branch information
FISHMANPET committed Jun 25, 2020
1 parent 1ac8cd3 commit 95cb1ff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions markdownlint.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,15 @@ function printResult(lintResult) {

if (program.junit) {
const builder = require('junit-report-builder');
const suite = builder.testSuite().name('Markdownlint');
const reportStart = new Date();
const suite = builder.testSuite().name('Markdownlint').timestamp(reportStart.toISOString());
results.forEach(result => {
const {file, lineNumber, column, names, description} = result;
const columnText = column ? `:${column}` : '';
suite.testCase().className(file).name(`${file}:${lineNumber}${columnText} ${names}`).failure(`${file}:${lineNumber}${columnText} ${names} ${description}`);
suite.testCase().className(file).name(`${file}:${lineNumber}${columnText} ${names}`).failure(`${file}:${lineNumber}${columnText} ${names} ${description}`, names).time(0.001);
});
const reportTime = (new Date().getTime() - reportStart.getTime()) / 1000;
suite.time(reportTime);
try {
builder.writeTo(program.junit);
} catch (error) {
Expand Down

0 comments on commit 95cb1ff

Please sign in to comment.