aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-03-01 19:00:31 -0500
committerEli Schwartz <eschwartz@archlinux.org>2022-03-01 21:42:52 -0500
commita6e08e8fa7052c776989bf9410b87bf4d1f2ad49 (patch)
tree9ca2fb4bbb78b058c7d1ed925eef0b95c86b3554 /.github
parent530338782cce2f3380011c5f3e34050edf4e9243 (diff)
downloadmeson-a6e08e8fa7052c776989bf9410b87bf4d1f2ad49.zip
meson-a6e08e8fa7052c776989bf9410b87bf4d1f2ad49.tar.gz
meson-a6e08e8fa7052c776989bf9410b87bf4d1f2ad49.tar.bz2
use a more sane check instead of run_custom_lint
Unfortunately, checking for strings without context is exceedingly prone to false positives, while missing anything that indirectly opens a file. Python 3.10 has a feature to warn about this though -- and it uses a runtime check which runs at the same time that the code fails to open files in the broken Windows locale. Set this up automatically when running the testsuite. Sadly, Python's builtin feature to change the warning level, e.g. by setting EncodingWarning to error at startup, is utterly broken if you want to limit it to only certain modules. This is tracked in order to be more efficiently ignored at https://bugs.python.org/issue34624 and https://github.com/python/cpython/pull/9358 It is also very trigger happy and passing stuff around via environment variable either messes with the testsuite, or with thirdparty programs which are implemented in python *such as lots of gnome*, or perhaps both. Instead, add runtime code to meson itself, to add a hidden "feature". In the application source code, running the 'warnings' module, you can actually get the expected behavior that $PYTHONWARNINGS doesn't have. So check for a magic testsuite variable every time meson starts up, and if it does, then go ahead and initialize a warnings filter that makes EncodingWarning fatal, but *only* when triggered via Meson and not arbitrary subprocess scripts.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/lint.yml9
1 files changed, 0 insertions, 9 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index ee4b1db..4afbc84 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -26,15 +26,6 @@ jobs:
- run: python -m pip install pylint
- run: pylint mesonbuild
- custom_lint:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-python@v2
- with:
- python-version: '3.x'
- - run: python ./run_custom_lint.py
-
mypy:
runs-on: ubuntu-latest
steps: