Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow folder of problem matcher registration #183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -4632,6 +4632,7 @@ const installer = __importStar(__webpack_require__(749));
const auth = __importStar(__webpack_require__(202));
const path = __importStar(__webpack_require__(622));
const url_1 = __webpack_require__(835);
const fs = __importStar(__webpack_require__(747));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
@@ -4655,10 +4656,12 @@ function run() {
if (registryUrl) {
auth.configAuthentication(registryUrl, alwaysAuth);
}
const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
console.log(`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`);
console.log(`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`);
// Iterate and register all problem matchers
const matchersPath = path.join(__dirname, '..', 'matchers');
const matchers = fs.readdirSync(matchersPath);
matchers.forEach(matcher => {
console.log(`##[add-matcher]${path.join(matchersPath, matcher)}`);
});
}
catch (error) {
core.setFailed(error.message);
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 7 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ import * as installer from './installer';
import * as auth from './authutil';
import * as path from 'path';
import {URL} from 'url';
import * as fs from 'fs';

export async function run() {
try {
@@ -30,14 +31,12 @@ export async function run() {
auth.configAuthentication(registryUrl, alwaysAuth);
}

const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
console.log(
`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`
);
console.log(
`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`
);
// Iterate and register all problem matchers
const matchersPath = path.join(__dirname, '..', 'matchers');
const matchers = fs.readdirSync(matchersPath);
matchers.forEach(matcher => {
console.log(`##[add-matcher]${path.join(matchersPath, matcher)}`);
});
} catch (error) {
core.setFailed(error.message);
}