Skip to content

Commit

Permalink
Merge pull request #10 from ulrichb/fix/TeamCityWindowsInspectionPaths
Browse files Browse the repository at this point in the history
Fix "inspection" formatter paths for TeamCity instances running on Windows
  • Loading branch information
ThaNarie authored Mar 13, 2019
2 parents 7c63d48 + 9680959 commit 906dd47
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 906dd47

Please sign in to comment.