summaryrefslogtreecommitdiff
path: root/.github/workflows/lint.yml
AgeCommit message (Collapse)Author
2025-10-31ci: pin python for pylint to 3.13 to avoid "deprecated in 3.14"Eli Schwartz
It is not overridable via --py-version, astoundingly.
2025-10-31wrap: automatically utilize truststore, if it is installedEli Schwartz
https://truststore.readthedocs.io/ This library allows patching the stdlib ssl module to respect system certificates, which is a common source of "broken internet" for Windows users especially. Fixes: https://github.com/mesonbuild/meson/issues/15121
2025-06-18Remove coverage measurement.Jussi Pakkanen
2024-09-20CI: run lint workflows on changes to the lint config filesDylan Baker
2024-07-30ci: Update actions/setup-python to v5 to fix deprecationsNirbheek Chauhan
2024-07-30ci: Update to checkout@v4 to squelch node warningsNirbheek Chauhan
Keep using v3 for Bionic because of https://github.com/mesonbuild/meson/pull/13424
2024-03-11CI: pin mypy to version 1.8Dylan Baker
Version 1.9 removes support for python 3.7, so we either need to pin the version to 1.8 as long as we're support Python 3.7, or we need to drop linting for 3.7
2023-11-26NOMERGE: do we need strictyaml too?Eli Schwartz
2023-11-26fix broken type annotation imports being ignoredEli Schwartz
If an annotation could not be resolved, it's classified as a "missing import" and our configuration ignored it: ``` Skipping analyzing "mesonbuild.backends": module is installed, but missing library stubs or py.typed marker ``` As far as mypy is concerned, this library may or may not exist, but it doesn't have any typing information at all (may need to be installed first). We ignored this because of our docs/ and tools/ thirdparty dependencies, but we really should not. It is trivial to install them, and then enforce that this "just works". By enforcing it, we also make sure typos get caught.
2023-08-18CI: make linters emit colored outputEli Schwartz
Github Actions supports this fine, but is misdetected by flake8/mypy. Even though pylint defaults to text instead of colorized, we might as well do the right thing here though.
2023-08-18run_mypy: add option to run once for each supported version of pythonEli Schwartz
This allows verifying that meson is type-safe under older versions of Python, which it currently is. Different versions of Python sometimes have different supported types for an API. Verify this in CI. (We flush output to ensure CI prints lines in the right order.)
2022-11-28github workflows: upgrade actions/checkout to version 3Eli Schwartz
This is a no-op change, but github complains that nodejs is outdated if you don't. It's not obvious why this required a major version bump...
2022-11-28github workflows: upgrade setup-python to version 4Eli Schwartz
Not much changes, really, other than it now sets PKG_CONFIG_PATH to point to the python it just installed. This should generally not be a problem (Meson's python module sets that anyway based on the executable's introspection data).
2022-10-30ci: Fix usage of concurrency in branches other than masterL. E. Segovia
2022-08-29flake8: run in CIEli Schwartz
We should have full coverage now, so make sure we don't regress in the future.
2022-06-24chore: Set permissions for GitHub actionsneilnaveen
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2022-03-01use a more sane check instead of run_custom_lintEli Schwartz
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.
2022-01-31add types-PyYAML to lint workflowStone Tickle
2021-12-31rename lint workflow for less confusionEli Schwartz
For a long time now, this has done 3 different things, only one of which is mypy. But they are labeled: - LintMypy / lint (runs pylint) - LintMypy / custom_lint (runs a custom script) - LintMypy / mypy (actually runs mypy) This reduces the usable length of the label which isn't all that long to begin with, is actively misleading, and even when you know what is going on, it becomes harder to tell at a glance what failed. Change it to be more unambiguous.