Skip to content

Commit

Permalink
Add problem matchers for CI (modelica#3972)
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Jun 9, 2022
1 parent 3c4d35f commit 79e63f5
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .github/checkTags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "checkTags",
"pattern": [
{
"regexp": "^File\\s\"(?:\\.\\/)?([^\"]*)\":\\sline\\s(\\d+)\\s-\\s(Error|Warning|Info):\\s(.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
}
]
}
16 changes: 16 additions & 0 deletions .github/check_deprecated_line_color.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "check_deprecated_line_color",
"pattern": [
{
"regexp": "^File\\s\"(?:\\.\\/)?([^\"]*)\":\\sline\\s(\\d+)\\s-\\s(Error|Warning|Info):\\s(.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
}
]
}
16 changes: 16 additions & 0 deletions .github/moparser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "moparser",
"pattern": [
{
"regexp": "^syntax\\s(error)\\son\\s\\line\\s(\\d+)\\sof\\s(.*):\\s(.*)$",
"file": 3,
"line": 2,
"severity": 1,
"message": 4
}
]
}
]
}
18 changes: 18 additions & 0 deletions .github/tidyHTML.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "tidyHTML",
"pattern": [
{
"regexp": "^File\\s\"(?:\\.\\/)?([^\"]*)\":\\sline\\s(\\d+)\\scolumn\\s(\\d+)\\s-\\s(Error|Warning|Info):\\s(.*)\\s\\((.*)\\)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5,
"code": 6
}
]
}
]
}
24 changes: 18 additions & 6 deletions .github/workflows/checkCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
python-version: 3.8
- name: Install python packages
run: |
pip install --user pytidylib
pip install --user futures
pip install --disable-pip-version-check --user pytidylib
pip install --disable-pip-version-check --user futures
- name: Build html tidy
run: |
git clone --branch 5.8.0 --depth=1 https://github.com/htacg/tidy-html5.git
Expand All @@ -55,9 +55,15 @@ jobs:
popd
sudo ldconfig
- name: Tidy html
run: python ./.CI/check_html.py tidyHTML ./
run: |
echo "::add-matcher::./.github/tidyHTML.json"
python ./.CI/check_html.py tidyHTML ./
echo "::remove-matcher owner=tidyHTML::"
- name: Check tags
run: python ./.CI/check_html.py checkTags ./
run: |
echo "::add-matcher::./.github/checkTags.json"
python ./.CI/check_html.py checkTags ./
echo "::remove-matcher owner=checkTags::"
syntax_checks:
timeout-minutes: 5
runs-on: ubuntu-latest
Expand All @@ -72,7 +78,10 @@ jobs:
- name: Check for UTF-8 BOM
run: "! find . -name '*.mo' -print0 | xargs -0 grep -l $'^\\xEF\\xBB\\xBF' | grep ."
- name: Check syntax
run: ModelicaSyntaxChecker/Linux64/moparser -v 3.4 -r Complex.mo Modelica ModelicaReference ModelicaServices ModelicaTest ModelicaTestConversion4.mo ModelicaTestOverdetermined.mo ObsoleteModelica4.mo
run: |
echo "::add-matcher::./.github/moparser.json"
ModelicaSyntaxChecker/Linux64/moparser -v 3.4 -r Complex.mo Modelica ModelicaReference ModelicaServices ModelicaTest ModelicaTestConversion4.mo ModelicaTestOverdetermined.mo ObsoleteModelica4.mo
echo "::remove-matcher owner=moparser::"
deprecation_checks:
timeout-minutes: 5
runs-on: ubuntu-latest
Expand All @@ -85,4 +94,7 @@ jobs:
with:
python-version: 3.8
- name: Check deprecated Text.lineColor annotation
run: python ./.CI/check_deprecated_line_color.py Complex.mo Modelica ModelicaReference ModelicaServices ModelicaTest ModelicaTestConversion4.mo ModelicaTestOverdetermined.mo
run: |
echo "::add-matcher::./.github/check_deprecated_line_color.json"
python ./.CI/check_deprecated_line_color.py Complex.mo Modelica ModelicaReference ModelicaServices ModelicaTest ModelicaTestConversion4.mo ModelicaTestOverdetermined.mo
echo "::remove-matcher owner=check_deprecated_line_color::"

0 comments on commit 79e63f5

Please sign in to comment.