Skip to content

Commit

Permalink
Detection for multi-line comments, update regex
Browse files Browse the repository at this point in the history
Signed-off-by: amitrahman1026 <[email protected]>
  • Loading branch information
amitrahman1026 committed Nov 9, 2023
1 parent 248b22f commit 51ef8c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builders/cmake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ class CMakeBuilder implements IBuilder {
if (reverse) lines = lines.reverse();

// FIXME: this doesn't support file name which contains ':', but captures white space
const re = /CMake Error at \/(?<file>[^:]+):(?<line>\d+)(:(?<col>\d+))?\b/;
const re = /(?:CMake Error at )?(?<file>[^:]+):(?<line>\d+)(:(?<col>\d+))?\b/;
for (const line of lines) {
const m = line.match(re);
const m = line.trimStart().match(re);
if (m && m.groups) {
return new FileLocation(
m.groups.file as string,
Expand Down

0 comments on commit 51ef8c9

Please sign in to comment.