[llvm] [openmp] [polly] GitHub Actions: Lint Python code for just for SyntaxErrors (PR #123940)

Christian Clauss via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 01:51:33 PST 2025


cclauss wrote:

> Syntax errors in Python will get caught if the code runs.

If ___that line of code___ runs...  In `summarizeStats.py` line 40 will only crash on the end user if line 39 evaluates to True and line 146 will only crash if line 145 evaluates to True.  This means that this file can be run repeatedly without detecting these syntax errors but then with a certain input or when a certain function is called they crash in production.  These runtime crashes are quite different from and more dangerous than compile-time crashes.

> I don't think we're really lacking any significant coverage in terms of python syntax errors.

If we can find 4 files in one second then coverage is incomplete and we should not sweep runtime crashes under the rug.

I would encourage you to use `pre-commit` in a smaller project to see the just-in-time value that it delivers.

https://github.com/llvm/llvm-project/pull/123940


More information about the llvm-commits mailing list