llvm-project/clang/docs/tools
paul_hoad 6f56a586c5 [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project
Summary:
Any change to clang-format is tested with the unit tests, However sometimes the better approach is to run it over a very large fully formatted source tree and then inspect the differences. This seems to be a source of many of the regressions found by @krasimir  and by @sylvestre.ledru and @Abpostelnicu who run it over the Mozilla sources, but often these regressions are only found after changes have been committed.

LLVM itself would be a good dog-fooding candidate for similar tests except such a large proportion of the tree is not 100% clang formatted, as such you are never aware if the change comes from a change to clang-format or  just because the tree has not been formatted first.

The following review is for a small python tool which scans the whole of the LLVM source tree and counts the number of files which have one or more clang-format violations.

This revision contains the tool and the output from the initial run of the tool and the generated documentation which looks like the following

Reviewers: krasimir, JakeMerdichAMD, sammccall, curdeius, bollu, alexshap, jdoerfert, DavidTruby, sscalpone

Reviewed By: curdeius

Subscribers: dschuff, aheejin, fedor.sergeev, ilya-biryukov, simoncook, cryptoad, arphaman, jfb, kadircet, mstorsjo, s.egerton, usaxena95, aartbik, phosek, sstefan1, cfe-commits, sylvestre.ledru, Abpostelnicu, krasimir

Tags: #clang, #clang-format

Differential Revision: https://reviews.llvm.org/D80627
2020-05-29 20:27:56 +01:00
..
dump_ast_matchers.py [docs] dump-ast-matchers removes const from Matcher args and handles template functions slightly better 2020-02-26 01:56:50 +00:00
dump_format_style.py [clang-format] ensure dump_format_style.py works with Python3 correctly 2020-05-07 19:52:12 +01:00
generate_formatted_state.py [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project 2020-05-29 20:27:56 +01:00