Michael Buch 763fbee264
[CI][lldb] Add a github workflow that runs pylint on LLDB API test changes (#182003)
The motivator here is that Python allows class methods to be redefined.
But in the vast majority of cases this is a bug. E.g., in our API
test-suite two methods with the same name cause the latest definition to
shadow the earlier, in which case only one test-case runs. This happens
silently. Every couple of months i've been running the script from
https://github.com/llvm/llvm-project/pull/97043 manually on the
code-base and it catches a handful of these every time.

This patch sets up a github action that runs on pull requests that
change any files under `lldb/test/API`. The action runs `pylint` on the
changed Python files. The caveat here is that `pylint` isn't set up to
run cleanly on our test-suite. So I just use the [specific redefinition
error
code](https://pylint.readthedocs.io/en/stable/user_guide/messages/error/function-redefined.html).
Any other errors won't cause `pylint` to fail for now (hence the
`--error-under=0`).

Here's an example:
<img width="1412" height="367" alt="Screenshot From 2026-02-20 10-29-28"
src="https://github.com/user-attachments/assets/20093be8-a122-4e17-944a-4472eb12ab25"
/>
2026-02-20 19:07:25 +00:00
..