|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
|---|
| 3 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
|---|
| 4 | };
|
|---|
| 5 | Object.defineProperty(exports, "__esModule", { value: true });
|
|---|
| 6 | const minimatch_1 = __importDefault(require("minimatch"));
|
|---|
| 7 | const path_1 = __importDefault(require("path"));
|
|---|
| 8 | const forwardSlash_1 = __importDefault(require("../utils/path/forwardSlash"));
|
|---|
| 9 | function createIssuePredicateFromIssueMatch(context, match) {
|
|---|
| 10 | return (issue) => {
|
|---|
| 11 | const matchesOrigin = !match.origin || match.origin === issue.origin;
|
|---|
| 12 | const matchesSeverity = !match.severity || match.severity === issue.severity;
|
|---|
| 13 | const matchesCode = !match.code || match.code === issue.code;
|
|---|
| 14 | const matchesFile = !issue.file ||
|
|---|
| 15 | (!!issue.file &&
|
|---|
| 16 | (!match.file || minimatch_1.default(forwardSlash_1.default(path_1.default.relative(context, issue.file)), match.file)));
|
|---|
| 17 | return matchesOrigin && matchesSeverity && matchesCode && matchesFile;
|
|---|
| 18 | };
|
|---|
| 19 | }
|
|---|
| 20 | exports.createIssuePredicateFromIssueMatch = createIssuePredicateFromIssueMatch;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.