[llvm] [Workflow] Expand code-format-helper.py error reporting (PR #69686)

Ryan Prichard via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 00:59:58 PDT 2023


rprichard wrote:

I'm trying to fix a couple of issue I recently ran into:

 * `darker` failed, but @EricWF and I also thought that git-clang-format had failed. References:
    *  https://github.com/llvm/llvm-project/pull/69271#issuecomment-1771707503
    * https://github.com/llvm/llvm-project/actions/runs/6581095590/job/17880364421#step:8:63

   The last lines in the log are:
   ```
   Running: git-clang-format --diff 3694697003bbf443fd644c6746a1c7c937657fce 2eeb907aa716fb45ebac1d3e57abfa6587afe1cd -- libcxx/test/libcxx/input.output/iostream.format/print.fun/vprint_unicode_posix.pass.cpp libcxx/test/std/input.output/iostream.format/print.fun/no_file_description.pass.cpp libcxx/test/std/input.output/iostream.format/print.fun/print.file.pass.cpp libcxx/test/std/input.output/iostream.format/print.fun/println.file.pass.cpp libcxx/test/std/input.output/iostream.format/print.fun/vprint_nonunicode.file.pass.cpp libcxx/test/std/input.output/iostream.format/print.fun/vprint_unicode.file.pass.cpp libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/gcount.pass.cpp libcxxabi/test/test_demangle.pass.cpp
   Error: Process completed with exit code 1.
   ```

 * I recently merged a change that added new Python files that don't pass `black`/`darker`. When I run the `darker` command myself locally, it fails and prints a diff. However, the change passed the check on GitHub without printing any error. References:
    * https://github.com/llvm/llvm-project/pull/69274#issuecomment-1772093337
    * https://github.com/llvm/llvm-project/actions/runs/6541446281/job/17762983123?pr=69274#step:8:1

I'm not sure how to test this change, but it does pass `mypy` and `black`.

I was a bit confused by the `param: [str]` type annotations... AFAICT mypy and pytype don't accept it and require `param: list[str]` instead, so I change the annotations.


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


More information about the llvm-commits mailing list