Open mrchief opened 4 years ago
Try to separate formats via whitespace:
cat issue | errorformat "%EFAILURE:\ Schema\ [%-P%f]%.%#" "%#.\ %m" "%C%.%#" "%-G%.%#"
/github/workspace/schemas/meta-info/jsonschema/1-0-0|| error: "objecta" is not a valid primitive type (valid values are: [array, boolean, integer, null, number, object, string])
/github/workspace/schemas/meta-info/jsonschema/1-0-0|| Error: JSON Schema [iglu:root/meta-info/jsonschema/1-0-0] doesn't conform path [schemas/meta-info/jsonschema/1-0-0]
/github/workspace/schemas/view_info/jsonschema/1-0-0|| Error: JSON Schema [iglu:root/view_info/jsonschema/1-0-0] doesn't conform path [schemas/view_info/jsonschema/1-0-0]
/github/workspace/schemas/page_info/jsonschema/1-0-0|| error: "String" is not a valid primitive type (valid values are: [array, boolean, integer, null, number, object, string])
/github/workspace/schemas/page_info/jsonschema/1-0-0|| Error: JSON Schema [iglu:root/page_info/jsonschema/1-0-0] doesn't conform path [schemas/page_info/jsonschema/1-0-0]
/github/workspace/schemas/user_info/jsonschema/1-0-0|| Error: JSON Schema [iglu:root/user_info/jsonschema/1-0-0] doesn't conform path [schemas/user_info/jsonschema/1-0-0]
And if you pass -efm flag for reviewdog, you have to pass multiple efm flag in this case:
reviewdog -efm="%EFAILURE:\ Schema\ [%-P%f]%.%#" -efm="%#.\ %m" -efm="%C%.%#" -efm="%-G%.%#"
Ah I see! I wanted to incorporate reviewdog with my action https://github.com/marketplace/actions/iglu-schema-lint but I couldn't due to this issue. I resorted to doing regex matches.
Another issue I ran into was the fact that these errors didn't have a line number all the time, so again I'm trying to guess them in order to make sure they are part of diff. Is that something reviewdog can handle better?
Given this error log:
and errorformat string
the playground can parse errors correctly
But the CLI tool
doesn't output the
filename
properly:README says
...but it doesn't support Vim regex.
but I see this toowhich is using a regex pattern
%.%#
.Not a vim user and up until yesterday, I had no idea what an errorformat was. So I'm not sure what's going on here.
The ultimate issue is that reviewdog is not reporting any findings despite errors so I'm trying to debug that.