Explorar o código

CI: use built in github output format instead of custom parsers

GitHub seems very fussy about regexps, and it isn't clear what it
doesn't like. Give up, and use built-in formatters in yamllint and
ruff.
Jason Rumney %!s(int64=2) %!d(string=hai) anos
pai
achega
de6d0e698d
Modificáronse 3 ficheiros con 2 adicións e 41 borrados
  1. 2 8
      .github/workflows/linting.yml
  2. 0 15
      ruff.json
  3. 0 18
      yamllint.json

+ 2 - 8
.github/workflows/linting.yml

@@ -18,16 +18,10 @@ jobs:
           python -m pip install --upgrade pip
           pip install -r requirements-dev.txt
       - name: Python lint
-        run: |
-          echo "::add-matcher::ruff.json"
-          ruff check custom_components/tuya_local
-          echo "::remove-matcher owner=ruff::"
+        run: ruff check --output-format=github custom_components/tuya_local
       - name: Python include order
         run: ruff check --select I --diff .
       - name: Python coding style
         run: ruff format --check --diff .
       - name: YAML lint
-        run: |
-          echo "::add-matcher::yamllint.json"
-          yamllint -f parsable custom_components/tuya_local/devices
-          echo "::remove-matcher owner=yamllint::"
+        run: yamllint --format github custom_components/tuya_local/devices

+ 0 - 15
ruff.json

@@ -1,15 +0,0 @@
-{
-    "problemMatcher": [
-        {
-            "owner": "ruff",
-            "pattern": [
-                "regexp": "^(.+):(\\d+):(\\d+):\\s([A-Z]\\d+)\\s(.*)$",
-                "file": 1,
-                "line": 2,
-                "column": 3,
-                "code": 4,
-                "message": 5
-            ]
-        }
-    ]
-}

+ 0 - 18
yamllint.json

@@ -1,18 +0,0 @@
-{
-    "problemMatcher": [
-        {
-            "owner": "yamllint",
-            "pattern": [
-                {
-                    "regexp": "^(.+):\\s(.+):(\\d+):(\\d+):\\s(.+)\\s\\((.+)\\)$",
-                    "severity": 1,
-                    "file": 2,
-                    "line": 3,
-                    "column": 4,
-                    "message": 5,
-                    "code": 6
-                }
-            ]
-        }
-    ]
-}