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

Commit

Permalink
make sure verify javascript annotations do not output the full path f…
Browse files Browse the repository at this point in the history
…rom root but only output the relative path from CWD
  • Loading branch information
JakeChampion committed Jun 12, 2020
1 parent 8f74096 commit 35bc685
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tasks/verify-javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function lint (config) {

if (isCI) {
results.forEach(result => {
const file = result.filePath;
const file = result.filePath.replace(config.cwd, '');
result.messages.forEach(issue => {
const newLine = "%0A";
const message = issue.message.replace(/\n/g, newLine);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tasks/verify-javascript.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('verify-javascript', function() {
proclaim.calledTwice(console.log);
proclaim.calledWithExactly(
console.log,
`::error file=/Users/jake.champion/Code/repo-data-cli/repos/origami-build-tools/test/unit/fixtures/verify/src/js/error/invalid.js,line=1,col=6,code=undefined,severity=error::Parsing error: Unexpected token test`
`::error file=/invalid.js,line=1,col=6,code=undefined,severity=error::Parsing error: Unexpected token test`
);
}
});
Expand Down

0 comments on commit 35bc685

Please sign in to comment.