diff --git a/dist/setup/index.js b/dist/setup/index.js index d415cbd..8cbadd2 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -94047,6 +94047,11 @@ const qualityOptions = [ 'preview', 'ga' ]; +/** + * The problem matcher files to be registered with the runner. + * https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md + */ +const problemMatchers = ['csc.json', 'dotnet-format.json']; function run() { return __awaiter(this, void 0, void 0, function* () { try { @@ -94104,8 +94109,9 @@ function run() { const cacheDependencyPath = core.getInput('cache-dependency-path'); yield (0, cache_restore_1.restoreCache)(cacheDependencyPath); } - const matchersPath = path_1.default.join(__dirname, '..', '..', '.github'); - core.info(`##[add-matcher]${path_1.default.join(matchersPath, 'csc.json')}`); + for (const file of problemMatchers) { + core.info(`##[add-matcher]${path_1.default.join(__dirname, '..', '..', '.github', file)}`); + } } catch (error) { core.setFailed(error.message); diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index 2a628a5..dfbabad 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -19,6 +19,12 @@ const qualityOptions = [ export type QualityOptions = (typeof qualityOptions)[number]; +/** + * The problem matcher files to be registered with the runner. + * https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md + */ +const problemMatchers = ['csc.json', 'dotnet-format.json']; + export async function run() { try { // @@ -89,8 +95,11 @@ export async function run() { await restoreCache(cacheDependencyPath); } - const matchersPath = path.join(__dirname, '..', '..', '.github'); - core.info(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`); + for (const file of problemMatchers) { + core.info( + `##[add-matcher]${path.join(__dirname, '..', '..', '.github', file)}` + ); + } } catch (error) { core.setFailed(error.message); }