48 lines · plain
1.. title:: clang-tidy - llvm-namespace-comment2 3llvm-namespace-comment4======================5 6`google-readability-namespace-comments` redirects here as an alias for this7check.8 9Checks that long namespaces have a closing comment.10 11https://llvm.org/docs/CodingStandards.html#namespace-indentation12 13https://google.github.io/styleguide/cppguide.html#Namespaces14 15.. code-block:: c++16 17 namespace n1 {18 void f();19 }20 21 // becomes22 23 namespace n1 {24 void f();25 } // namespace n126 27 28Options29-------30 31.. option:: ShortNamespaceLines32 33 Requires the closing brace of the namespace definition to be followed by a34 closing comment if the body of the namespace has more than35 `ShortNamespaceLines` lines of code. The value is an unsigned integer that36 defaults to `1U`.37 38.. option:: SpacesBeforeComments39 40 An unsigned integer specifying the number of spaces before the comment41 closing a namespace definition. Default is `1U`.42 43.. option:: AllowOmittingNamespaceComments44 45 When `true`, the check will accept if no namespace comment is present.46 The check will only fail if the specified namespace comment is different47 than expected. Default is `false`.48