[clang-tidy] Updates to documentation: formatting, titles, etc.
authorAlexander Kornienko <alexfh@google.com>
Tue, 22 Dec 2015 17:36:49 +0000 (17:36 +0000)
committerAlexander Kornienko <alexfh@google.com>
Tue, 22 Dec 2015 17:36:49 +0000 (17:36 +0000)
llvm-svn: 256259

78 files changed:
clang-tools-extra/clang-tidy/add_new_check.py
clang-tools-extra/docs/clang-tidy/checks/cert-setlongjmp.rst
clang-tools-extra/docs/clang-tidy/checks/cert-static-object-exception.rst
clang-tools-extra/docs/clang-tidy/checks/cert-thrown-exception-type.rst
clang-tools-extra/docs/clang-tidy/checks/cert-variadic-function-def.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-array-to-pointer-decay.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-pointer-arithmetic.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-const-cast.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-cstyle-cast.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-reinterpret-cast.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-static-cast-downcast.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-union-access.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-vararg.rst
clang-tools-extra/docs/clang-tidy/checks/google-build-explicit-make-pair.rst
clang-tools-extra/docs/clang-tidy/checks/google-build-namespaces.rst
clang-tools-extra/docs/clang-tidy/checks/google-build-using-namespace.rst
clang-tools-extra/docs/clang-tidy/checks/google-explicit-constructor.rst
clang-tools-extra/docs/clang-tidy/checks/google-global-names-in-headers.rst
clang-tools-extra/docs/clang-tidy/checks/google-readability-braces-around-statements.rst
clang-tools-extra/docs/clang-tidy/checks/google-readability-casting.rst
clang-tools-extra/docs/clang-tidy/checks/google-readability-function-size.rst
clang-tools-extra/docs/clang-tidy/checks/google-readability-namespace-comments.rst
clang-tools-extra/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst
clang-tools-extra/docs/clang-tidy/checks/google-readability-todo.rst
clang-tools-extra/docs/clang-tidy/checks/google-runtime-int.rst
clang-tools-extra/docs/clang-tidy/checks/google-runtime-member-string-references.rst
clang-tools-extra/docs/clang-tidy/checks/google-runtime-memset.rst
clang-tools-extra/docs/clang-tidy/checks/google-runtime-operator.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/llvm-header-guard.rst
clang-tools-extra/docs/clang-tidy/checks/llvm-include-order.rst
clang-tools-extra/docs/clang-tidy/checks/llvm-namespace-comment.rst
clang-tools-extra/docs/clang-tidy/checks/llvm-twine-local.rst
clang-tools-extra/docs/clang-tidy/checks/misc-argument-comment.rst
clang-tools-extra/docs/clang-tidy/checks/misc-assert-side-effect.rst
clang-tools-extra/docs/clang-tidy/checks/misc-assign-operator-signature.rst
clang-tools-extra/docs/clang-tidy/checks/misc-bool-pointer-implicit-conversion.rst
clang-tools-extra/docs/clang-tidy/checks/misc-inaccurate-erase.rst
clang-tools-extra/docs/clang-tidy/checks/misc-inefficient-algorithm.rst
clang-tools-extra/docs/clang-tidy/checks/misc-macro-parentheses.rst
clang-tools-extra/docs/clang-tidy/checks/misc-macro-repeated-side-effects.rst
clang-tools-extra/docs/clang-tidy/checks/misc-move-constructor-init.rst
clang-tools-extra/docs/clang-tidy/checks/misc-new-delete-overloads.rst
clang-tools-extra/docs/clang-tidy/checks/misc-noexcept-move-constructor.rst
clang-tools-extra/docs/clang-tidy/checks/misc-non-copyable-objects.rst
clang-tools-extra/docs/clang-tidy/checks/misc-sizeof-container.rst
clang-tools-extra/docs/clang-tidy/checks/misc-static-assert.rst
clang-tools-extra/docs/clang-tidy/checks/misc-string-integer-assignment.rst
clang-tools-extra/docs/clang-tidy/checks/misc-swapped-arguments.rst
clang-tools-extra/docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.rst
clang-tools-extra/docs/clang-tidy/checks/misc-undelegated-constructor.rst
clang-tools-extra/docs/clang-tidy/checks/misc-uniqueptr-reset-release.rst
clang-tools-extra/docs/clang-tidy/checks/misc-unused-alias-decls.rst
clang-tools-extra/docs/clang-tidy/checks/misc-unused-parameters.rst
clang-tools-extra/docs/clang-tidy/checks/misc-unused-raii.rst
clang-tools-extra/docs/clang-tidy/checks/modernize-loop-convert.rst
clang-tools-extra/docs/clang-tidy/checks/modernize-make-unique.rst
clang-tools-extra/docs/clang-tidy/checks/modernize-pass-by-value.rst
clang-tools-extra/docs/clang-tidy/checks/modernize-replace-auto-ptr.rst
clang-tools-extra/docs/clang-tidy/checks/modernize-shrink-to-fit.rst
clang-tools-extra/docs/clang-tidy/checks/modernize-use-auto.rst
clang-tools-extra/docs/clang-tidy/checks/modernize-use-default.rst
clang-tools-extra/docs/clang-tidy/checks/modernize-use-nullptr.rst
clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst
clang-tools-extra/docs/clang-tidy/checks/readability-braces-around-statements.rst
clang-tools-extra/docs/clang-tidy/checks/readability-container-size-empty.rst
clang-tools-extra/docs/clang-tidy/checks/readability-else-after-return.rst
clang-tools-extra/docs/clang-tidy/checks/readability-function-size.rst
clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst
clang-tools-extra/docs/clang-tidy/checks/readability-implicit-bool-cast.rst
clang-tools-extra/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst
clang-tools-extra/docs/clang-tidy/checks/readability-named-parameter.rst
clang-tools-extra/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst
clang-tools-extra/docs/clang-tidy/checks/readability-redundant-string-cstr.rst
clang-tools-extra/docs/clang-tidy/checks/readability-simplify-boolean-expr.rst
clang-tools-extra/docs/clang-tidy/checks/readability-uniqueptr-delete-release.rst
clang-tools-extra/docs/index.rst

index 0041576..513941a 100755 (executable)
@@ -244,7 +244,9 @@ def write_docs(module_path, module, check_name):
   print('Creating %s...' % filename)
   with open(filename, 'wb') as f:
     f.write(
-"""%(check_name_dashes)s
+""".. title:: clang-tidy - %(check_name_dashes)s
+
+%(check_name_dashes)s
 %(underline)s
 
 FIXME: Describe what patterns does the check detect and why. Give examples.
index fcce116..5fc1fbf 100644 (file)
@@ -1,5 +1,7 @@
+.. title:: clang-tidy - cert-dcl50-cpp
+
 cert-dcl50-cpp
-========================
+==============
 
 This check flags all function definitions (but not declarations) of C-style
 variadic functions.
index b245c43..22b14ac 100644 (file)
@@ -1,12 +1,16 @@
+.. title:: clang-tidy - cppcoreguidelines-pro-type-vararg
+
 cppcoreguidelines-pro-type-vararg
-=====================================
+=================================
+
+This check flags all calls to c-style vararg functions and all use of va_arg.
 
-This check flags all calls to c-style vararg functions and all use
-of va_arg.
-To allow for SFINAE use of vararg functions, a call is not flagged if
-a literal 0 is passed as the only vararg argument.
+To allow for SFINAE use of vararg functions, a call is not flagged if a literal
+0 is passed as the only vararg argument.
 
-Passing to varargs assumes the correct type will be read. This is fragile because it cannot generally be enforced to be safe in the language and so relies on programmer discipline to get it right.
+Passing to varargs assumes the correct type will be read. This is fragile
+because it cannot generally be enforced to be safe in the language and so relies
+on programmer discipline to get it right.
 
 This rule is part of the "Type safety" profile of the C++ Core Guidelines, see
 https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-type8-avoid-reading-from-varargs-or-passing-vararg-arguments-prefer-variadic-template-parameters-instead
index f800144..60faead 100644 (file)
@@ -1,4 +1,6 @@
-List of clang-tidy Checks
+.. title:: clang-tidy - Clang-Tidy Checks
+
+Clang-Tidy Checks
 =========================
 
 .. toctree::   
index 4e2aeef..faafcd9 100644 (file)
@@ -1,3 +1,5 @@
+.. title:: clang-tidy - misc-string-integer-assignment
+
 misc-string-integer-assignment
 ==============================
 
@@ -6,11 +8,13 @@ The check finds assignments of an integer to ``std::basic_string<CharT>``
 following assignment operator of ``std::basic_string<CharT>``:
 
 .. code:: c++
+
   basic_string& operator=( CharT ch );
 
 Numeric types can be implicity casted to character types.
 
 .. code:: c++
+
   std::string s;
   int x = 5965;
   s = 6;
@@ -19,6 +23,7 @@ Numeric types can be implicity casted to character types.
 Use the appropriate conversion functions or character literals.
 
 .. code:: c++
+
   std::string s;
   int x = 5965;
   s = '6';
@@ -27,5 +32,6 @@ Use the appropriate conversion functions or character literals.
 In order to suppress false positives, use an explicit cast.
 
 .. code:: c++
+
   std::string s;
   s = static_cast<char>(6);
index df9d554..dcb873f 100644 (file)
@@ -1,3 +1,5 @@
+.. title:: clang-tidy - modernize-make-unique
+
 modernize-make-unique
 =====================
 
@@ -12,4 +14,3 @@ to ``std::make_unique``, introduced in C++14.
   // becomes
 
   auto my_ptr = std::make_unique<MyPair>(1, 2);
-
index b16933f..4ed1cf1 100644 (file)
@@ -14,7 +14,7 @@ Clang's tooling API's.
 Contents
 ========
 .. toctree::
-   :maxdepth: 1
+   :maxdepth: 2
 
    clang-tidy/index
    modularize