Add problem matchers (#26)

Closes: #12
This commit is contained in:
Kevin Stillhammer
2024-12-08 12:17:50 +01:00
committed by GitHub
parent c9185454fa
commit 35619fdbcc
4 changed files with 49 additions and 0 deletions
Generated Vendored
+6
View File
@@ -34614,6 +34614,7 @@ function run() {
const setupResult = yield setupRuff(platform, arch, inputs_1.version, inputs_1.checkSum, inputs_1.githubToken);
addRuffToPath(setupResult.ruffDir);
setOutputFormat();
addMatchers();
core.setOutput("ruff-version", setupResult.version);
core.info(`Successfully installed ruff version ${setupResult.version}`);
yield runRuff(path.join(setupResult.ruffDir, "ruff"), inputs_1.args.split(" "), inputs_1.src.split(" "));
@@ -34650,6 +34651,11 @@ function setOutputFormat() {
core.exportVariable("RUFF_OUTPUT_FORMAT", "github");
core.info("Set RUFF_OUTPUT_FORMAT to github");
}
function addMatchers() {
const matchersPath = path.join(__dirname, `..${path.sep}..`, ".github", "matchers");
core.info(`##[add-matcher]${path.join(matchersPath, "check.json")}`);
core.info(`##[add-matcher]${path.join(matchersPath, "format.json")}`);
}
function runRuff(ruffExecutablePath, args, src) {
return __awaiter(this, void 0, void 0, function* () {
const execArgs = [...args, ...src];