Skip to content

Commit a45afa1

Browse files
committed
style: regex comment indentation
1 parent 73bc770 commit a45afa1

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

lib/main.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,28 @@ function parseGcc(stdout) {
1313
const messages = [];
1414
let match = null;
1515
const deepRegex = /([^:^\r?\n]+):(\d+):(\d+):\s(\w+\s*\w*):\s(.+)\r?\n(\s+)(.*)\s+(~*\^~*)/gm;
16-
// ^ ^ ^ ^ ^ ^ ^ ^
17-
// | | | | | | +- affected code +- token marker
18-
// | | | | | +- whitespace before code
19-
// | | | | +- message text
20-
// | | | +- type (error|warning|note)
21-
// | | +- column
22-
// | +- line
23-
// +- filename
16+
// ^ ^ ^ ^ ^ ^ ^ ^
17+
// | | | | | | | +- token marker
18+
// | | | | | | +- affected code
19+
// | | | | | +- whitespace before code
20+
// | | | | +- message text
21+
// | | | +- type (error|warning|note)
22+
// | | +- column
23+
// | +- line
24+
// +- filename
2425
while ((match = deepRegex.exec(stdout))) {
2526
messages.push(new Message().fromGcc(match, stdout));
2627
}
2728

2829
const simpleRegex = /([^:^\r?\n]+):(\d+):(\d+):\s(\w+\s*\w*):\s(.+)\r?\n(?!\s)/gm;
29-
// ^ ^ ^ ^ ^ ^ ^
30-
// | | | | | | +- affected code
31-
// | | | | | +- whitespace before code
32-
// | | | | +- message text
33-
// | | | +- type (error|warning|note)
34-
// | | +- column
35-
// | +- line
36-
// +- filename
30+
// ^ ^ ^ ^ ^ ^
31+
// | | | | | |
32+
// | | | | | +- whitespace before code
33+
// | | | | +- message text
34+
// | | | +- type (error|warning|note)
35+
// | | +- column
36+
// | +- line
37+
// +- filename
3738
match = null;
3839
while ((match = simpleRegex.exec(stdout))) {
3940
messages.push(new Message().fromGcc(match, stdout));

0 commit comments

Comments
 (0)