codeclimate / codeclimate-phpcodesniffer

Code Climate Engine for PHP Code Sniffer
MIT License
28 stars 23 forks source link

Fix path replacement #24

Closed noahd1 closed 8 years ago

noahd1 commented 8 years ago

Previously we were searching for all instances of "/code" to an empty string for reporting back to Code Climate. This was resulting in any file that had a nested directory called "code" to be replaced which created issues with display.

Change the replacement of "/code" to a regular expression that anchors the pattern so that we only replace the first instance.

gdiggs commented 8 years ago

LGTM