CMake/Source/CTest
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
..
cmCTestBZR.cxx Fix spelling typos in comments and documentation (#16037) 2016-03-29 14:31:02 -04:00
cmCTestBZR.h Convert CMake to OSI-approved BSD License 2009-09-28 11:43:28 -04:00
cmCTestBatchTestHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestBatchTestHandler.h Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestBuildAndTestHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestBuildAndTestHandler.h Port all cmOStringStream to std::ostringstream. 2015-01-11 17:06:03 +01:00
cmCTestBuildCommand.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestBuildCommand.h stringapi: Command names 2014-03-08 13:05:39 -05:00
cmCTestBuildHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestBuildHandler.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestCVS.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestCVS.h cmCTestUpdateHandler: Port to cmXMLWriter 2015-05-26 11:09:21 -04:00
cmCTestCommand.h Convert CMake to OSI-approved BSD License 2009-09-28 11:43:28 -04:00
cmCTestConfigureCommand.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestConfigureCommand.h stringapi: Command names 2014-03-08 13:05:39 -05:00
cmCTestConfigureHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestConfigureHandler.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestCoverageCommand.cxx ctest_coverage: Add QUIET option 2015-02-23 10:02:00 -05:00
cmCTestCoverageCommand.h stringapi: Command names 2014-03-08 13:05:39 -05:00
cmCTestCoverageHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestCoverageHandler.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestCurl.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestCurl.h ctest_submit: Escape URL components in CDASH_UPLOAD mode 2015-01-30 10:36:38 -05:00
cmCTestEmptyBinaryDirectoryCommand.cxx Port all cmOStringStream to std::ostringstream. 2015-01-11 17:06:03 +01:00
cmCTestEmptyBinaryDirectoryCommand.h stringapi: Command names 2014-03-08 13:05:39 -05:00
cmCTestGIT.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestGIT.h CTest: Update Git submodules with --recursive 2011-02-22 15:47:50 -05:00
cmCTestGenericHandler.cxx Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestGenericHandler.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestGlobalVC.cxx cmCTestUpdateHandler: Port to cmXMLWriter 2015-05-26 11:09:21 -04:00
cmCTestGlobalVC.h cmCTestUpdateHandler: Port to cmXMLWriter 2015-05-26 11:09:21 -04:00
cmCTestHG.cxx stringapi: Miscellaneous char* parameters 2014-03-08 13:05:37 -05:00
cmCTestHG.h Convert CMake to OSI-approved BSD License 2009-09-28 11:43:28 -04:00
cmCTestHandlerCommand.cxx CTest: Optionally add a ChangeId attribute on XML Site tags 2015-07-17 10:26:28 -04:00
cmCTestHandlerCommand.h ctest_submit: Add QUIET option 2015-02-23 10:01:58 -05:00
cmCTestLaunch.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestLaunch.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestMemCheckCommand.cxx ctest_memcheck: Add QUIET option 2015-02-23 10:02:00 -05:00
cmCTestMemCheckCommand.h stringapi: Command names 2014-03-08 13:05:39 -05:00
cmCTestMemCheckHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestMemCheckHandler.h Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestMultiProcessHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestMultiProcessHandler.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestP4.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestP4.h Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestReadCustomFilesCommand.cxx Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestReadCustomFilesCommand.h stringapi: Command names 2014-03-08 13:05:39 -05:00
cmCTestRunScriptCommand.cxx Port all cmOStringStream to std::ostringstream. 2015-01-11 17:06:03 +01:00
cmCTestRunScriptCommand.h stringapi: Command names 2014-03-08 13:05:39 -05:00
cmCTestRunTest.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestRunTest.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestSVN.cxx cmCTestUpdateHandler: Port to cmXMLWriter 2015-05-26 11:09:21 -04:00
cmCTestSVN.h cmCTestUpdateHandler: Port to cmXMLWriter 2015-05-26 11:09:21 -04:00
cmCTestScriptHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestScriptHandler.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestSleepCommand.cxx Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
cmCTestSleepCommand.h stringapi: Command names 2014-03-08 13:05:39 -05:00
cmCTestStartCommand.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestStartCommand.h ctest_start: Add QUIET option 2015-02-23 10:01:59 -05:00
cmCTestSubmitCommand.cxx ctest_submit: Add QUIET option 2015-02-23 10:01:58 -05:00
cmCTestSubmitCommand.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestSubmitHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestSubmitHandler.h ctest_submit: Add CDASH_UPLOAD mode to upload files to CDash 2015-01-20 09:33:21 -05:00
cmCTestTestCommand.cxx ctest: Optionally avoid starting tests that may exceed a given CPU load 2015-06-30 10:21:37 -04:00
cmCTestTestCommand.h ctest: Optionally avoid starting tests that may exceed a given CPU load 2015-06-30 10:21:37 -04:00
cmCTestTestHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestTestHandler.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestUpdateCommand.cxx cmCTestGIT: add an option to initialize submodules on update 2016-04-01 15:50:31 -04:00
cmCTestUpdateCommand.h stringapi: Command names 2014-03-08 13:05:39 -05:00
cmCTestUpdateHandler.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCTestUpdateHandler.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestUploadCommand.cxx ctest_upload: Add QUIET option 2015-02-23 10:02:00 -05:00
cmCTestUploadCommand.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCTestUploadHandler.cxx cmCTestUploadHandler: Port to cmXMLWriter 2015-05-26 11:09:21 -04:00
cmCTestUploadHandler.h Implement ctest_upload command 2011-03-15 15:07:37 -04:00
cmCTestVC.cxx cmCTestUpdateHandler: Port to cmXMLWriter 2015-05-26 11:09:21 -04:00
cmCTestVC.h cmCTestUpdateHandler: Port to cmXMLWriter 2015-05-26 11:09:21 -04:00
cmParseBlanketJSCoverage.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmParseBlanketJSCoverage.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmParseCacheCoverage.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmParseCacheCoverage.h Remove uncovered files from cache coverage data. 2012-05-02 17:23:01 -04:00
cmParseCoberturaCoverage.cxx Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmParseCoberturaCoverage.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmParseDelphiCoverage.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmParseDelphiCoverage.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmParseGTMCoverage.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmParseGTMCoverage.h Add test for mumps coverage. Also refactor code to prepare for cache coverage. 2012-05-01 13:35:07 -04:00
cmParseJacocoCoverage.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmParseJacocoCoverage.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmParseMumpsCoverage.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmParseMumpsCoverage.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmParsePHPCoverage.cxx Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmParsePHPCoverage.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmProcess.cxx Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmProcess.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00