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.
+.. title:: clang-tidy - cert-err52-cpp
+
cert-err52-cpp
==============
+.. title:: clang-tidy - cert-err58-cpp
+
cert-err58-cpp
==============
+.. title:: clang-tidy - cert-err60-cpp
+
cert-err60-cpp
==============
+.. title:: clang-tidy - cert-dcl50-cpp
+
cert-dcl50-cpp
-========================
+==============
This check flags all function definitions (but not declarations) of C-style
variadic functions.
+.. title:: clang-tidy - cppcoreguidelines-pro-bounds-array-to-pointer-decay
+
cppcoreguidelines-pro-bounds-array-to-pointer-decay
===================================================
+.. title:: clang-tidy - cppcoreguidelines-pro-bounds-constant-array-index
+
cppcoreguidelines-pro-bounds-constant-array-index
=================================================
+.. title:: clang-tidy - cppcoreguidelines-pro-bounds-pointer-arithmetic
+
cppcoreguidelines-pro-bounds-pointer-arithmetic
===============================================
+.. title:: clang-tidy - cppcoreguidelines-pro-type-const-cast
+
cppcoreguidelines-pro-type-const-cast
=====================================
+.. title:: clang-tidy - cppcoreguidelines-pro-type-cstyle-cast
+
cppcoreguidelines-pro-type-cstyle-cast
======================================
+.. title:: clang-tidy - cppcoreguidelines-pro-type-reinterpret-cast
+
cppcoreguidelines-pro-type-reinterpret-cast
===========================================
+.. title:: clang-tidy - cppcoreguidelines-pro-type-static-cast-downcast
+
cppcoreguidelines-pro-type-static-cast-downcast
===============================================
+.. title:: clang-tidy - cppcoreguidelines-pro-type-union-access
+
cppcoreguidelines-pro-type-union-access
=======================================
+.. 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
+.. title:: clang-tidy - google-build-explicit-make-pair
+
google-build-explicit-make-pair
===============================
+.. title:: clang-tidy - google-build-namespaces
+
google-build-namespaces
=======================
+.. title:: clang-tidy - google-build-using-namespace
+
google-build-using-namespace
============================
+.. title:: clang-tidy - google-explicit-constructor
+
google-explicit-constructor
===========================
+.. title:: clang-tidy - google-global-names-in-headers
+
google-global-names-in-headers
==============================
+.. title:: clang-tidy - google-readability-braces-around-statements
+
google-readability-braces-around-statements
===========================================
+.. title:: clang-tidy - google-readability-casting
+
google-readability-casting
==========================
+.. title:: clang-tidy - google-readability-function-size
+
google-readability-function-size
================================
+.. title:: clang-tidy - google-readability-namespace-comments
+
google-readability-namespace-comments
=====================================
+.. title:: clang-tidy - google-readability-redundant-smartptr-get
+
google-readability-redundant-smartptr-get
=========================================
+.. title:: clang-tidy - google-readability-todo
+
google-readability-todo
=======================
+.. title:: clang-tidy - google-runtime-int
+
google-runtime-int
==================
+.. title:: clang-tidy - google-runtime-member-string-references
+
google-runtime-member-string-references
=======================================
+.. title:: clang-tidy - google-runtime-memset
+
google-runtime-memset
=====================
+.. title:: clang-tidy - google-runtime-operator
+
google-runtime-operator
=======================
-List of clang-tidy Checks
+.. title:: clang-tidy - Clang-Tidy Checks
+
+Clang-Tidy Checks
=========================
.. toctree::
+.. title:: clang-tidy - llvm-header-guard
+
llvm-header-guard
=================
+.. title:: clang-tidy - llvm-include-order
+
llvm-include-order
==================
+.. title:: clang-tidy - llvm-namespace-comment
+
llvm-namespace-comment
======================
+.. title:: clang-tidy - llvm-twine-local
+
llvm-twine-local
================
+.. title:: clang-tidy - misc-argument-comment
+
misc-argument-comment
=====================
+.. title:: clang-tidy - misc-assert-side-effect
+
misc-assert-side-effect
=======================
+.. title:: clang-tidy - misc-assign-operator-signature
+
misc-assign-operator-signature
==============================
+.. title:: clang-tidy - misc-bool-pointer-implicit-conversion
+
misc-bool-pointer-implicit-conversion
=====================================
+.. title:: clang-tidy - misc-inaccurate-erase
+
misc-inaccurate-erase
=====================
+.. title:: clang-tidy - misc-inefficient-algorithm
+
misc-inefficient-algorithm
==========================
+.. title:: clang-tidy - misc-macro-parentheses
+
misc-macro-parentheses
======================
+.. title:: clang-tidy - misc-macro-repeated-side-effects
+
misc-macro-repeated-side-effects
================================
+.. title:: clang-tidy - misc-move-constructor-init
+
misc-move-constructor-init
==========================
+.. title:: clang-tidy - misc-new-delete-overloads
+
misc-new-delete-overloads
=========================
+.. title:: clang-tidy - misc-noexcept-move-constructor
+
misc-noexcept-move-constructor
==============================
+.. title:: clang-tidy - misc-non-copyable-objects
+
misc-non-copyable-objects
=========================
+.. title:: clang-tidy - misc-sizeof-container
+
misc-sizeof-container
=====================
+.. title:: clang-tidy - misc-static-assert
+
misc-static-assert
==================
+.. title:: clang-tidy - misc-string-integer-assignment
+
misc-string-integer-assignment
==============================
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;
Use the appropriate conversion functions or character literals.
.. code:: c++
+
std::string s;
int x = 5965;
s = '6';
In order to suppress false positives, use an explicit cast.
.. code:: c++
+
std::string s;
s = static_cast<char>(6);
+.. title:: clang-tidy - misc-swapped-arguments
+
misc-swapped-arguments
======================
+.. title:: clang-tidy - misc-throw-by-value-catch-by-reference
+
misc-throw-by-value-catch-by-reference
======================================
+.. title:: clang-tidy - misc-undelegated-constructor
+
misc-undelegated-constructor
============================
+.. title:: clang-tidy - misc-uniqueptr-reset-release
+
misc-uniqueptr-reset-release
============================
+.. title:: clang-tidy - misc-unused-alias-decls
+
misc-unused-alias-decls
=======================
+.. title:: clang-tidy - misc-unused-parameters
+
misc-unused-parameters
======================
+.. title:: clang-tidy - misc-unused-raii
+
misc-unused-raii
================
+.. title:: clang-tidy - modernize-loop-convert
+
modernize-loop-convert
======================
+.. title:: clang-tidy - modernize-make-unique
+
modernize-make-unique
=====================
// becomes
auto my_ptr = std::make_unique<MyPair>(1, 2);
-
+.. title:: clang-tidy - modernize-pass-by-value
+
modernize-pass-by-value
=======================
+.. title:: clang-tidy - modernize-replace-auto-ptr
+
modernize-replace-auto-ptr
==========================
+.. title:: clang-tidy - modernize-shrink-to-fit
+
modernize-shrink-to-fit
=======================
+.. title:: clang-tidy - modernize-use-auto
+
modernize-use-auto
==================
+.. title:: clang-tidy - modernize-use-default
+
modernize-use-default
=====================
+.. title:: clang-tidy - modernize-use-nullptr
+
modernize-use-nullptr
=====================
+.. title:: clang-tidy - modernize-use-override
+
modernize-use-override
======================
+.. title:: clang-tidy - readability-braces-around-statements
+
readability-braces-around-statements
====================================
+.. title:: clang-tidy - readability-container-size-empty
+
readability-container-size-empty
================================
+.. title:: clang-tidy - readability-else-after-return
+
readability-else-after-return
=============================
+.. title:: clang-tidy - readability-function-size
+
readability-function-size
=========================
+.. title:: clang-tidy - readability-identifier-naming
+
readability-identifier-naming
=============================
+.. title:: clang-tidy - readability-implicit-bool-cast
+
readability-implicit-bool-cast
==============================
+.. title:: clang-tidy - readability-inconsistent-declaration-parameter-name
+
readability-inconsistent-declaration-parameter-name
===================================================
+.. title:: clang-tidy - readability-named-parameter
+
readability-named-parameter
===========================
+.. title:: clang-tidy - readability-redundant-smartptr-get
+
readability-redundant-smartptr-get
==================================
+.. title:: clang-tidy - readability-redundant-string-cstr
+
readability-redundant-string-cstr
=================================
+.. title:: clang-tidy - readability-simplify-boolean-expr
+
readability-simplify-boolean-expr
=================================
+.. title:: clang-tidy - readability-uniqueptr-delete-release
+
readability-uniqueptr-delete-release
====================================
Contents
========
.. toctree::
- :maxdepth: 1
+ :maxdepth: 2
clang-tidy/index
modularize