Commit bc984e2
committed
Gitblame: fix fatal error on
The `Reporter::prepareFileReport()` method strips the `basepath` off the file name for the `$report['filename']`.
https://github.com/squizlabs/PHP_CodeSniffer/blob/276f68cc74a3e4e1855bab6d01f0089337d00ae0/src/Reporter.php#L337
While this is fine in most cases, for "blame" reports, the full path is needed.
This changes the path passed to the `getBlameContent()` method in subclasses of the `VersionControl` class to the full path, which fixes the fatal error for the `Gitblame` report (and probably similar/related errors in the `Hgblame` and the `Svnblame` reports, but I don't have any repos to test this on).
Fixes 3854chdir() when basepath is set and phpcs is run from subdir1 parent 3bef736 commit bc984e2
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments