CMake/Tests/QtAutogen
Brad King e1c7747253 Format include directive blocks and ordering with clang-format
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first).  First
run `clang-format` with the config file:

    ---
    SortIncludes: false
    ...

Commit the result temporarily.  Then run `clang-format` again with:

    ---
    SortIncludes: true
    IncludeCategories:
      - Regex:    'sys/types.h'
        Priority: -1
    ...

Commit the result temporarily.  Start a new branch and cherry-pick the
second commit.  Manually resolve conflicts to preserve indentation of
re-ordered includes.  This cleans up the include ordering without
changing any other style.

Use the following command to run `clang-format`:

    $ git ls-files -z -- \
        '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
      egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
      egrep -z -v '^Source/cm_sha2' |
      egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
      egrep -z -v '^Utilities/(KW|cm).*/' |
      egrep -z -v '^Tests/Module/GenerateExportHeader' |
      egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
      xargs -0 clang-format -i

This selects source files that do not come from a third-party.

Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
2016-04-29 13:58:54 -04:00
..
Adir Revert "Automoc: Fix support of files with the same name (#12873)" 2016-02-19 08:59:17 -05:00
Bdir Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
automoc_rerun QtAutogen: Always run autogen step even when rcc is enabled (#15608) 2015-06-19 10:29:38 -04:00
autorcc_depends QtAutogen: Workaround rcc CRCRLF newlines on Windows (#15459) 2015-04-16 15:10:40 -04:00
defines_test
same_name Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
sub
CMakeLists.txt Tests: QtAutogen: Same source name in different directories test 2016-04-22 08:55:44 -04:00
abc.cpp
abc.h
abc_p.h
bar.cpp
blub.cpp
blub.h
calwidget.cpp Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
calwidget.h
calwidget.ui
codeeditor.cpp
codeeditor.h Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
debug_class.cpp
debug_class.h
debug_class.ui
debug_resource.qrc
empty.cpp
empty.h
foo.cpp
foo.h
gadget.cpp
gadget.h
generated.cpp
generated.h
generated.txt.in QtAutogen: Process 'rcc --list' stdout and stderr separately (#15523) 2015-04-21 09:33:19 -04:00
generated_resource.qrc.in QtAutogen: Process 'rcc --list' stdout and stderr separately (#15523) 2015-04-21 09:33:19 -04:00
libC.cpp
libC.h Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
main.cpp Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
multiplewidgets.cpp
multiplewidgets.h
myinterface.h.in
myotherinterface.h.in
not_generated_file.qrc
private_slot.cpp
private_slot.h
rcconly.cpp
resourcetester.cpp Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
resourcetester.h
second_resource.qrc
second_widget.cpp
second_widget.h
second_widget.ui
targetObjectsTest.cpp cmGlobalGenerator: Initialize generator targets on construction (#15729) 2015-09-29 09:56:34 -04:00
test.qrc
widget1.ui
widget2.ui
xyz.cpp
xyz.h
yaf.cpp
yaf.h
yaf_p.h