Skip to content

Commit

Permalink
Do not capture 'filename'
Browse files Browse the repository at this point in the history
phpmd resolves all paths to 'real' paths and uses such 'real' paths in the
reports. Since we cannot map such a 'real' path back to a 'user' path, we MUST
not capture these filename.

Fixes #21
  • Loading branch information
kaste committed Apr 13, 2019
1 parent d17a0fa commit 0d29861
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
class Phpmd(Linter):
cmd = ('phpmd', '${temp_file}', 'text')
regex = (
r'(?P<filename>.+):(?P<line>\d+)'
# For now, do *NOT* capture 'filename' since phpmd reports 'real'
# paths, and Sublime and SL cannot map such paths to the original
# `view.file_name()`.
r'(?P<filename_>.+):(?P<line>\d+)'
r'\s*(?P<message>.+)$'
)
on_stderr = None # handle stderr via regex
Expand Down

0 comments on commit 0d29861

Please sign in to comment.