build: lint commits on Chromium roller branches (#49862)

* build: lint commits on Chromium roller branches

Assisted-By: Claude Opus 4.5

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: add ability to skip linting CLs by adding #nolint

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: only exit with non-zero exit code in CI

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
trop[bot]
2026-02-19 09:53:51 +01:00
committed by GitHub
parent 62a60064a0
commit eb68705a0f
4 changed files with 314 additions and 22 deletions

View File

@@ -142,8 +142,29 @@ async function findMatchingFiles (top, test) {
});
}
function compareVersions (v1, v2) {
const [split1, split2] = [v1.split('.'), v2.split('.')];
if (split1.length !== split2.length) {
throw new Error(
`Expected version strings to have same number of sections: ${split1} and ${split2}`
);
}
for (let i = 0; i < split1.length; i++) {
const p1 = parseInt(split1[i], 10);
const p2 = parseInt(split2[i], 10);
if (p1 > p2) return 1;
else if (p1 < p2) return -1;
// Continue checking the value if this portion is equal
}
return 0;
}
module.exports = {
chunkFilenames,
compareVersions,
findMatchingFiles,
getCurrentBranch,
getElectronExec,