Index: clang-tidy/safety/SafetyTidyModule.cpp =================================================================== --- clang-tidy/safety/SafetyTidyModule.cpp +++ clang-tidy/safety/SafetyTidyModule.cpp @@ -10,6 +10,19 @@ #include "../ClangTidy.h" #include "../ClangTidyModule.h" #include "../ClangTidyModuleRegistry.h" +#include "../cppcoreguidelines/ProTypeMemberInitCheck.h" +#include "../cppcoreguidelines/SpecialMemberFunctionsCheck.h" +#include "../google/DefaultArgumentsCheck.h" +#include "../google/ExplicitConstructorCheck.h" +#include "../misc/NewDeleteOverloadsCheck.h" +#include "../misc/NoexceptMoveConstructorCheck.h" +#include "../misc/UndelegatedConstructor.h" +#include "../misc/UseAfterMoveCheck.h" +#include "../modernize/UseEqualsDefaultCheck.h" +#include "../modernize/UseEqualsDeleteCheck.h" +#include "../modernize/UseOverrideCheck.h" +#include "../readability/FunctionSizeCheck.h" +#include "../readability/IdentifierNamingCheck.h" #include "NoAssemblerCheck.h" namespace clang { @@ -19,8 +32,32 @@ class SafetyModule : public ClangTidyModule { public: void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { - CheckFactories.registerCheck( - "safety-no-assembler"); + CheckFactories.registerCheck( + "safety-explicit-conversions"); + CheckFactories.registerCheck( + "safety-function-size"); + CheckFactories.registerCheck( + "safety-identifier-naming"); + CheckFactories.registerCheck( + "safety-invalid-access-moved"); + CheckFactories.registerCheck( + "safety-member-init"); + CheckFactories.registerCheck( + "safety-new-delete-operators"); + CheckFactories.registerCheck( + "safety-noexcept-move"); + CheckFactories.registerCheck("safety-no-assembler"); + CheckFactories + .registerCheck( + "safety-special-member-functions"); + CheckFactories.registerCheck( + "safety-undelegated-constructor"); + CheckFactories.registerCheck( + "safety-use-equals-default"); + CheckFactories.registerCheck( + "safety-use-equals-delete"); + CheckFactories.registerCheck( + "safety-use-override"); } }; Index: docs/ReleaseNotes.rst =================================================================== --- docs/ReleaseNotes.rst +++ docs/ReleaseNotes.rst @@ -67,6 +67,11 @@ Finds misleading indentation where braces should be introduced or the code should be reformatted. +- New `safety` module + + Adds checks that implement the High Integrity C++ Coding Standard and other safety + standards. Many checks are aliased to other modules. + - New `safety-no-assembler `_ check Index: docs/clang-tidy/checks/safety-explicit-conversions.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-explicit-conversions.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-explicit-conversions + +safety-explicit-conversions +=========================== + +This check is an alias for `google-explicit-constructor `_. Index: docs/clang-tidy/checks/safety-function-size.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-function-size.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-function-size + +safety-function-size +==================== + +This check is an alias for `readability-function-size `_. Index: docs/clang-tidy/checks/safety-identifier-naming.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-identifier-naming.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-identifier-naming + +safety-identifier-naming +======================== + +This check is an alias for `readability-identifier-naming `_. Index: docs/clang-tidy/checks/safety-invalid-access-moved.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-invalid-access-moved.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-invalid-access-moved + +safety-invalid-access-moved +=========================== + +This check is an alias for `misc-use-after-move `_. Index: docs/clang-tidy/checks/safety-member-init.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-member-init.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-member-init + +safety-member-init +================== + +This check is an alias for `cppcoreguidelines-pro-type-member-init `_. Index: docs/clang-tidy/checks/safety-new-delete-operators.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-new-delete-operators.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-new-delete-operators + +safety-new-delete-operators +=========================== + +This check is an alias for `misc-new-delete-overloads `_. Index: docs/clang-tidy/checks/safety-noexcept-move.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-noexcept-move.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-noexcept-move + +safety-noexcept-move +==================== + +This check is an alias for `misc-noexcept-moveconstructor `_. Index: docs/clang-tidy/checks/safety-special-member-functions.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-special-member-functions.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-special-member-functions + +safety-special-member-functions +=============================== + +This check is an alias for `cppcoreguidelines-special-member-functions `_. Index: docs/clang-tidy/checks/safety-undelegated-constructor.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-undelegated-constructor.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-undelegated-construtor + +safety-undelegated-constructor +============================== + +This check is an alias for `misc-undelegated-constructor `_. Index: docs/clang-tidy/checks/safety-use-equals-default.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-use-equals-default.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-use-equals-defaults + +safety-use-equals-default +========================= + +This check is an alias for `modernize-use-equals-default `_. Index: docs/clang-tidy/checks/safety-use-equals-delete.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-use-equals-delete.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-use-equals-delete + +safety-use-equals-delete +======================== + +This check is an alias for `modernize-use-equals-delete `_. Index: docs/clang-tidy/checks/safety-use-override.rst =================================================================== --- /dev/null +++ docs/clang-tidy/checks/safety-use-override.rst @@ -0,0 +1,6 @@ +.. title:: clang-tidy - safety-use-override + +safety-use-override +=================== + +This check is an alias for `modernize-use-override `_.