Skip to content

Commit 022bcb6

Browse files
committed
.2.7
1 parent 082855a commit 022bcb6

File tree

3 files changed

+37
-12
lines changed

3 files changed

+37
-12
lines changed

dist/index.js

Lines changed: 16 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scripts/analyze.ts

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,26 @@ export const litAnalyzer = async (command: Command): Promise<stepResponse> => {
8181
// })
8282
// .join("");
8383

84-
const problemsLine = lines.filter((line) =>
85-
line.match(
86-
/^\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|$/,
87-
),
88-
);
89-
90-
const [i, _, __, problemCountStr, ___, ____] = problemsLine;
91-
const problemCount = parseInt(problemCountStr);
84+
const problemsCountStr = lines
85+
.map((line) => {
86+
const match = line.match(
87+
/^\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|$/,
88+
);
89+
if (match) {
90+
const [filesChecked, filesWithProblems, problems, errors, warnings] =
91+
match;
92+
return problems;
93+
}
94+
})
95+
.join("");
96+
// const problemsLine = lines.filter((line) =>
97+
// line.match(
98+
// /^\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|$/,
99+
// ),
100+
// );
101+
102+
// const [_, __, problemCountStr, ___, ____] = problemsLine[0].match(/^\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|$/) || [];
103+
const problemCount = parseInt(problemsCountStr);
92104
// const problemCount =
93105
// problemsLine.length > 0
94106
// ? parseInt(problemsLine[0].match(/(\d+) problem/)![1])

0 commit comments

Comments
 (0)