Skip to content

Commit

Permalink
Fix "inspection" formatter paths for TeamCity instances running on Wi…
Browse files Browse the repository at this point in the history
…ndows
  • Loading branch information
ulrichb committed Mar 12, 2019
1 parent 7c63d48 commit 9680959
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/formatters/inspections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export function formatAsInspections(failures: RuleFailure[], config: { [key: str
);

result.messages.forEach(failure => {
const filePath = path.relative(process.cwd(), failure.getFileName());
const relativeFilePath = path.relative(process.cwd(), failure.getFileName());
const filePath = relativeFilePath.replace(/\\/g, '/'); // Ensure slashes on Windows
const startPos = failure.getStartPosition().getLineAndCharacter();
const formattedMessage = `line ${startPos.line}, col ${
startPos.character
Expand Down

0 comments on commit 9680959

Please sign in to comment.