Debian Codegraph @

clang-tools-extra/docs/clang-tidy/checks/llvm/namespace-comment.rst

raw
1 .. title:: clang-tidy - llvm-namespace-comment
2
3 llvm-namespace-comment
4 ======================
5
6 `google-readability-namespace-comments` redirects here as an alias for this
7 check.
8
9 Checks that long namespaces have a closing comment.
10
11 https://llvm.org/docs/CodingStandards.html#namespace-indentation
12
13 https://google.github.io/styleguide/cppguide.html#Namespaces
14
15 .. code-block:: c++
16
17 namespace n1 {
18 void f();
19 }
20
21 // becomes
22
23 namespace n1 {
24 void f();
25 } // namespace n1
26
27
28 Options
29 -------
30
31 .. option:: ShortNamespaceLines
32
33 Requires the closing brace of the namespace definition to be followed by a
34 closing comment if the body of the namespace has more than
35 `ShortNamespaceLines` lines of code. The value is an unsigned integer that
36 defaults to `1U`.
37
38 .. option:: SpacesBeforeComments
39
40 An unsigned integer specifying the number of spaces before the comment
41 closing a namespace definition. Default is `1U`.