sk- / git-lint

improving source code one step at a time
Apache License 2.0
236 stars 78 forks source link

rubocop regular expression reports wrong lines #50

Closed sk- closed 9 years ago

sk- commented 9 years ago

The RE used for rubocop is incorrect as it matches lines that it should not.

The problem is that the first component is being captured with a .*, then comes the line number and then optionally the column number. However, as the .* can match a :, the line number component matches also the column number, generating thus many false positives.

The solution is to generate the report with the option --format emacs which generates the report having an absolute path and with a line and column number.