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
+12
View File
@@ -36,6 +36,7 @@ async function run(): Promise<void> {
addRuffToPath(setupResult.ruffDir);
setOutputFormat();
addMatchers();
core.setOutput("ruff-version", setupResult.version);
core.info(`Successfully installed ruff version ${setupResult.version}`);
@@ -92,6 +93,17 @@ function setOutputFormat() {
core.info("Set RUFF_OUTPUT_FORMAT to github");
}
function addMatchers(): void {
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")}`);
}
async function runRuff(
ruffExecutablePath: string,
args: string[],