Skip to content

Commit 0fde1cc

Browse files
committed
Pass full path into Checker instead of relative
AFAICT this path is only valuable to the Checker as a piece of information to pass to a reporter, so it makes sense to me to give the Checker the full filepath and let reporters sort out whether they want to display a relative path or not.
1 parent 81a6f88 commit 0fde1cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ module.exports = function (opts) {
5555
var contents = file.contents.toString();
5656

5757
if (opts.fix) {
58-
fixResults = checker.fixString(contents, file.relative);
58+
fixResults = checker.fixString(contents, file.path);
5959
errors = fixResults.errors;
6060
file.contents = new Buffer(fixResults.output);
6161
} else {
62-
errors = checker.checkString(contents, file.relative);
62+
errors = checker.checkString(contents, file.path);
6363
}
6464

6565
var errorList = errors.getErrorList();

0 commit comments

Comments
 (0)