diff --git a/dist/setup/index.js b/dist/setup/index.js index e638606..8e152de 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -100791,6 +100791,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']; async function run() { try { // @@ -100847,8 +100852,9 @@ async function run() { const cacheDependencyPath = core.getInput('cache-dependency-path'); await (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); }