[llvm] [lit] Fix some issues from --per-test-coverage (PR #65242)

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 08:08:59 PDT 2023


tru wrote:

> > I noticed that the python formatting check failed so I looked into that, the problem is the file `llvm/utils/lit/tests/per-test-coverage.py`
> 
> Thanks for pointing that out. I noticed it too but made the bad assumption that something was wrong with the pre-commit check itself, and I ran out of time to investigate. This is the diagnostic I saw after a traceback:
> Is there any way to get the pre-commit check to mention the name of the problematic file?
> 

I'll look into this, it also took me time to figure it out. 

> (By the way, I have noticed that many python files were formatted with >80 columns, probably the black default of 88. That doesn't fit in the 80-column editor/terminal windows I use for most of LLVM. Is there any good reason not to follow [the LLVM coding standard for source code width](https://llvm.org/docs/CodingStandards.html#source-code-width) in python files? I see no exception there for python, or did I misunderstand something? Black just needs a `-l80` command-line option.)
> 

This was discussed when we wrote the coding style for python and then we thought it was just better to use black's default to avoid having people need to run black with arguments (since it won't read a config file). 


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


More information about the llvm-commits mailing list