[llvm] Add GitHub workflow for check Python file formatting (PR #65482)

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 12:08:09 PDT 2023


tru wrote:

> > > May be this should be part of the build as `Clang-format` in `polly`? Same could be done for Python linters (`Flake8`, `PyLint`, `MyPy`).
> > 
> > 
> > Not sure what you mean. I am not familiar with what polly does? We seldom "build" for python scripts.
> 
> Nothing prevents to run some tools (formatters, linters) over Python source files during build. Sure, relevant rules should be added to CMake files.

That's true of course. But I don't think it will gain us anything here. It's going to be hard to do patch based formatting from CMake. We also need to install the whole toolchain and configure CMake just to run the formatters. So it adds a lot of complexity without a clear gain.

I think we might want to add darker to the pre-commit hook. 

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


More information about the llvm-commits mailing list