diff --git a/dist/gcc_matcher.jsontemplate b/dist/gcc_matcher.jsontemplate index d157a38..66128c7 100644 --- a/dist/gcc_matcher.jsontemplate +++ b/dist/gcc_matcher.jsontemplate @@ -4,7 +4,7 @@ "owner": "gcc-problem-matcher", "pattern": [ { - "regexp": "^.*?${{ BASE }}\/?(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$", + "regexp": "^\\s*${{ BASE }}\/?(.*?):(\\d+):(\\d+):.*?(warning|error): (.*)$" "file": 1, "line": 2, "column": 3, diff --git a/dist/index.js b/dist/index.js index 4efab8a..83f7223 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2862,18 +2862,13 @@ const templatePath = __nccwpck_require__.ab + "gcc_matcher.jsontemplate"; const matcherPath = __nccwpck_require__.ab + "gcc_matcher.json"; // rootdir :: string -const rootdir = () => - core.getInput('build-directory', {required: false}); +const rootdir = core.getInput('build-directory', {required: false}); // parse :: IO() => IO() => Error | null const parse = (templatePath) => (matcherPath) => { - const r = rootdir(); - - console.log(r); - const content = fs.readFileSync(templatePath, 'utf-8'); - const parsed = content.replace(variable("BASE"), escapeRegExp(rootdir())); + const parsed = content.replace(variable("BASE"), escapeRegExp(rootdir)); fs.writeFileSync(matcherPath, parsed); diff --git a/src/gcc_matcher.jsontemplate b/src/gcc_matcher.jsontemplate index d157a38..66128c7 100644 --- a/src/gcc_matcher.jsontemplate +++ b/src/gcc_matcher.jsontemplate @@ -4,7 +4,7 @@ "owner": "gcc-problem-matcher", "pattern": [ { - "regexp": "^.*?${{ BASE }}\/?(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$", + "regexp": "^\\s*${{ BASE }}\/?(.*?):(\\d+):(\\d+):.*?(warning|error): (.*)$" "file": 1, "line": 2, "column": 3,