[PATCH] D80627: [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 29 12:00:40 PDT 2020


MyDeveloperDay added inline comments.


================
Comment at: clang/docs/tools/generate_formatted_state.py:52
+        path = os.path.relpath(root, LLVM_DIR)
+        if "/test/" in path:
+            continue
----------------
curdeius wrote:
> MyDeveloperDay wrote:
> > curdeius wrote:
> > > That doesn't work on Windows because of slashes. You doesn't skip `unittests` (present at least in clang and llvm).
> > So unit tests is something that I I think needs to be clang-formatted, this is because often we are actively editing in there, (I use format on save) and so having clean tests is super important
> > 
> > The tests directories normally have 100's of small snippets of code and some may even be testing unformatted code deliberately, these files are often made once and not continuously edited, (whilst it would be good to have them clean, I wanted to give ourselves a fighting chance!)
> > 
> > Point taken about Windows, whilst I develop myself on Windows I use cygwin which is why it probably worked.
> OK, I agree for unittests. But then one could argue that the same should apply for test, nope?
The table would become massive because there are 100's of tests like

```
test/XXX1/file.cpp
test/XXX2/file.cpp
test/XXX3/file.cpp
test/XXX4/file.cpp
```

where XXX1 is the name of one specific test condition (this will make a row in the table)

I think for now we could exclude test, but like I said the GTESTS are where I spend half my time and I'd like those to be clean.

We can bring it back later when we are closer to 100% (if ever)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80627/new/

https://reviews.llvm.org/D80627





More information about the cfe-commits mailing list