Skip to content
Snippets Groups Projects
  1. May 19, 2016
  2. May 18, 2016
  3. May 17, 2016
  4. May 16, 2016
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · d9fd2f54
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `Utilities/Scripts/clang-format.bash` script to update
      all our C++ code to a new style defined by `.clang-format`.
      Use `clang-format` version 3.8.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      d9fd2f54
    • Brad King's avatar
      Empty commit at end of history preceding clang-format style transition · 82df6dea
      Brad King authored
      This is an empty commit that precedes an automatic application of
      clang-format to update the C++ style of our entire source tree.
      This may be helpful to rebase a topic branch that was originally
      based on a commit preceding the transition.  One may first rebase
      the topic on this commit.  Then use one of the following approaches.
      
      *   Rewrite the topic, including this commit, using `git filter-branch`
          `--tree-filter` with `Utilities/Scripts/clang-format.bash` to update
          the style in every commit.  Rebase the revised topic, excluding the
          rewrite of this commit, on the style transition commit.
      
      OR
      
      *   Add a `.git/info/grafts` entry to change the parent of the first
          commit in the topic from this commit to the style transition commit.
          Rewrite the topic using `git filter-branch --tree-filter` with
          `Utilities/Scripts/clang-format.bash` to update the style in every
          commit.  Then remove the graft, which was resolved by the filter.
      
      See `git help filter-branch` and `git help repository-layout` for
      details.
      82df6dea
    • Brad King's avatar
      CONTRIBUTING: Add a section on coding style · 6a13f43f
      Brad King authored
      Document that we now define our coding style with `clang-format`.
      6a13f43f
    • Brad King's avatar
      Add a script to run clang-format on the entire source tree · bf451d9f
      Brad King authored
      List all sources in version control and filter out those that we should
      not format for various reasons.  Then run the clang-format tool to do an
      in-place update.
      bf451d9f
    • Brad King's avatar
      Configure clang-format for CMake source tree · 1e90d78f
      Brad King authored
      After discussion among developers we settled on the Mozilla style
      with a few tweaks:
      
      * Do not align operator arguments.
      
      * Do not always break after a function return type.
      
      * Limit to 79 columns instead of 80 to fit edge cases
        better in 80-column terminals as CMake has always done.
      
      * Format for C++98 instead of C++11 because CMake is written
        in the former language.
      
      Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
      1e90d78f
    • Brad King's avatar
      Tell Git to use a distinct conflict marker size in `.rst` files · da60adc3
      Brad King authored
      Use a long conflict marker size that is unlikely to be in conflict
      with a `=======` section header underline.
      da60adc3
    • Brad King's avatar
      cmGeneratorTarget: Protect macro code layout from clang-format · c7006d2e
      Brad King authored
      The `IMPLEMENT_VISIT_IMPL` macro must preserve a space before the `>`
      character in case the `DATATYPE` is a template type ending in `>`.
      Manually format the macro layout as clang-format would except for this
      space.  Then add markup to tell clang-format not to format this macro.
      c7006d2e
    • Brad King's avatar
      Merge topic 'boost-component-headers' · d0828109
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      c2e8d515 FindBoost: Add checks for component-specific headers
      d0828109
Loading