When trying out the Checkstyle linter, I noticed that we sometimes weren't parsing out the correct line and character values. This then would cause the ArcanistLintMessage to point to the wrong spot in the code.
The existing regex would incorrectly believe path was /some/path/to/file.java:49 and the line number was 8. With the proposed pull request of making the regex lazy for the path grouping, we will then correctly have path be /some/path/to/file.java, line number be 49, and character be 8.
The canonical output of [WARN] /some/path.java:123: Some message [etc] is still parsed correctly.
When trying out the Checkstyle linter, I noticed that we sometimes weren't parsing out the correct line and character values. This then would cause the
ArcanistLintMessage
to point to the wrong spot in the code.For example, using the following example output:
[WARN] /some/path/to/file.java:49:8: Unused import - com.some.package.Class. [UnusedImports]
The existing regex would incorrectly believe
path
was/some/path/to/file.java:49
and the line number was8
. With the proposed pull request of making the regex lazy for thepath
grouping, we will then correctly havepath
be/some/path/to/file.java
, line number be49
, and character be8
.The canonical output of
[WARN] /some/path.java:123: Some message [etc]
is still parsed correctly.