Add fromPath to matcher template
This commit is contained in:
2
.github/workflows/CI.yml
vendored
2
.github/workflows/CI.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Apply problem matcher
|
||||
uses: ./
|
||||
with:
|
||||
build-directory: ""
|
||||
build-directory: build/
|
||||
|
||||
- name: Test problem matcher
|
||||
run: |
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
"owner": "gcc-problem-matcher",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^.*?${{ BASE }}\/?(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
"regexp": "^(${{ BASE }})(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"fromPath": 1,
|
||||
"file": 2,
|
||||
"line": 3,
|
||||
"column": 4,
|
||||
"severity": 5,
|
||||
"message": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ const matcherPath = path.join(__dirname, "gcc_matcher.json");
|
||||
// rootdir :: string
|
||||
const rootdir = core.getInput('build-directory', {required: false});
|
||||
|
||||
// parse :: IO() => IO() => Error | null
|
||||
// parse :: string => string => Error | null
|
||||
const parse = (templatePath) => (matcherPath) => {
|
||||
const content = fs.readFileSync(templatePath, 'utf-8');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user