Skip to content

Commit

Permalink
last
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxy-v committed Sep 1, 2024
1 parent c405d8a commit ac0345b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions scripts/check-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,9 @@ module.exports = async (sources, covFile) => {
for (let lines of clazz.lines) {
for (let line of lines.line) {
if (line.$.hits === '0') {
console.log(`Uncovered line in ${clazz.$.filename}:${line.$.number}`);

const idx = sources.findIndex(source => {
console.log(source.file, clazz.$.filename, source.file === clazz.$.filename);
console.log(source.lines, parseInt(line.$.number), source.lines.includes(parseInt(line.$.number)));
return source.file === clazz.$.filename && source.lines.includes(parseInt(line.$.number));
});
console.log(idx);
if (idx > -1) {
console.error(`!!!!!!!!!!!Uncovered line in ${clazz.$.filename}:${line.$.number}`);
const idx = sources.findIndex(source => source.file === clazz.$.filename && source.lines.includes(parseInt(line.$.number)));
if (idx !== -1) {
console.log(`Uncovered line in ${clazz.$.filename}:${line.$.number}`);
// Found an uncovered line in a changed file
return false;
}
Expand Down

0 comments on commit ac0345b

Please sign in to comment.