kungfusheep / SublimeLinter-contrib-stylelint

this repo is no longer maintained - please see https://github.com/SublimeLinter/SublimeLinter-stylelint
MIT License
116 stars 19 forks source link

Update sublime linter regex to handle whitespace in stylelint output #26

Closed JeremyPlease closed 8 years ago

JeremyPlease commented 8 years ago

Fixes kungfusheep/SublimeLinter-contrib-stylelint#25 Fixes kungfusheep/SublimeLinter-contrib-stylelint#20

The output of styelint looks like this:

    4:5    ✖  Expected indentation of 1 tab                                                    indentation

So, the regex now handles the whitespace at beginning of the line and between line number and error.

Props to @Arkkimaagi in #25 for the solution. I updated the regex to use \s instead of a space.

kungfusheep commented 8 years ago

cheers!

woble commented 8 years ago

For highlighting warnings (yellow) as well as errors (red), use the following regex:

^\s*(?P<line>\d+)\:(?P<col>\d+)\s*(?:(?P<error>×)|(?P<warning>‼))\s*(?P<message>.+)