Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f0e275979 | ||
|
|
4c3b4df0ad |
@@ -1,5 +1,7 @@
|
|||||||
# GCC problem matcher
|
# GCC problem matcher
|
||||||
|
|
||||||
|
# DO NOT COMMIT THIS LINE
|
||||||
|
|
||||||
Creates annotations for warnings and errors in gcc builds.
|
Creates annotations for warnings and errors in gcc builds.
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
|
|||||||
2
dist/gcc_matcher.jsontemplate
vendored
2
dist/gcc_matcher.jsontemplate
vendored
@@ -4,7 +4,7 @@
|
|||||||
"owner": "gcc-problem-matcher",
|
"owner": "gcc-problem-matcher",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
{
|
{
|
||||||
"regexp": "^.*?${{ BASE }}\/?(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
"regexp": "^\\s*${{ BASE }}\/?(.*?):(\\d+):(\\d+):.*?(warning|error): (.*)$"
|
||||||
"file": 1,
|
"file": 1,
|
||||||
"line": 2,
|
"line": 2,
|
||||||
"column": 3,
|
"column": 3,
|
||||||
|
|||||||
9
dist/index.js
vendored
9
dist/index.js
vendored
@@ -2862,18 +2862,13 @@ const templatePath = __nccwpck_require__.ab + "gcc_matcher.jsontemplate";
|
|||||||
const matcherPath = __nccwpck_require__.ab + "gcc_matcher.json";
|
const matcherPath = __nccwpck_require__.ab + "gcc_matcher.json";
|
||||||
|
|
||||||
// rootdir :: string
|
// rootdir :: string
|
||||||
const rootdir = () =>
|
const rootdir = core.getInput('build-directory', {required: false});
|
||||||
core.getInput('build-directory', {required: false});
|
|
||||||
|
|
||||||
// parse :: IO() => IO() => Error | null
|
// parse :: IO() => IO() => Error | null
|
||||||
const parse = (templatePath) => (matcherPath) => {
|
const parse = (templatePath) => (matcherPath) => {
|
||||||
const r = rootdir();
|
|
||||||
|
|
||||||
console.log(r);
|
|
||||||
|
|
||||||
const content = fs.readFileSync(templatePath, 'utf-8');
|
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);
|
fs.writeFileSync(matcherPath, parsed);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"owner": "gcc-problem-matcher",
|
"owner": "gcc-problem-matcher",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
{
|
{
|
||||||
"regexp": "^.*?${{ BASE }}\/?(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
"regexp": "^\\s*${{ BASE }}\/?(.*?):(\\d+):(\\d+):.*?(warning|error): (.*)$"
|
||||||
"file": 1,
|
"file": 1,
|
||||||
"line": 2,
|
"line": 2,
|
||||||
"column": 3,
|
"column": 3,
|
||||||
|
|||||||
Reference in New Issue
Block a user