From: Daniel Arndt Date: Fri, 3 Aug 2018 23:23:35 +0000 (+0200) Subject: More improvements to coding_conventions.h X-Git-Tag: v9.1.0-rc1~848^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2a953b272286a8275b1311608e2f93e5a1a6164;p=dealii.git More improvements to coding_conventions.h --- diff --git a/doc/doxygen/headers/coding_conventions.h b/doc/doxygen/headers/coding_conventions.h index 5576ee00cb..d8289c440c 100644 --- a/doc/doxygen/headers/coding_conventions.h +++ b/doc/doxygen/headers/coding_conventions.h @@ -35,7 +35,7 @@ code is written, without having to look up the exact definition of something.

deal.II uses clang-format 6.0 to normalize indentation. A style file is provided at @code - ${SOURCE_DIR}/.clang-format + \${SOURCE_DIR}/.clang-format @endcode

Before a commit, you should run @@ -53,8 +53,8 @@ in whatever directory you set up the library to be compiled in, to indent all source files that have been changed recently. If you want to make sure that the indenting is correct for all your commits, you might want to set up a pre-commit hook. One way to do so, is to copy -${SOURCE_DIR}/contrib/scripts/pre-commit-clang-format to -${SOURCE_DIR}/.git/hooks/pre-commit and make sure it is +\${SOURCE_DIR}/contrib/scripts/pre-commit-clang-format to +\${SOURCE_DIR}/.git/hooks/pre-commit and make sure it is executable.

@@ -369,7 +369,7 @@ we list here: the function even if they are only used further below. This leads to code like this that we may imagine in a 1d code: @code - template @ + template void foo () { Point cell_center; @@ -390,7 +390,7 @@ we list here:

A better way to do this would be as follows: @code - template @ + template void foo () { ... // something lengthy and complicated @@ -425,7 +425,7 @@ we list here: any more. In other words, if this is the case, we may as well write things as follows: @code - template @ + template void foo () { ... // something lengthy and complicated @@ -458,7 +458,7 @@ we list here: then mark it as constant. For example, the following function should take its argument as a constant value: @code - template @ + template typename Triangulation::cell_iterator CellAccessor::child (const unsigned int child_no) {