devops.cpp.ast.checks

Individual AST check implementations. Register new ones in ..registry.

Modules

enforce_class_member_order

Enforce a fixed section order for member variables and member functions.

enforce_cpp_only_include

Flag headers that may only be #included from .cpp files.

enforce_member_function_leading_underscore

Enforce a leading underscore on private and protected member functions.

enforce_member_leading_underscore

Enforce a leading underscore on private and protected member variables.

enforce_no_public_leading_underscore

Forbid a leading underscore on public member variables and functions.

enforce_param_name_for_type

Enforce a canonical parameter name for parameters of a given type.

enforce_pass_by_type

Enforce how parameters of certain types are passed.

enforce_system_header_libs

Flag #include "lib/..." for libraries that must be included as system headers.

enforce_typename_over_class

Flag use of class instead of typename for a template type parameter.

include_iwyu_pragma_only

Flag a #include line followed by a comment that isn't an allowed IWYU pragma.

macro_replacement

Flag banned macro invocations and suggest their replacement.

max_anonymous_namespace_size

Limit the size of anonymous namespaces.

name_filtered

Shared base for checks that can be narrowed by name via TOML.

no_clang_format_toggle

Flag // clang-format off / // clang-format on comments in code.

no_const_value_param

Flag top-level const on parameters passed by value.

no_delete_in_gtest_teardown

Flag delete/delete[] expressions inside a GTest teardown function.

no_final_keyword

Flag use of the final specifier on classes, structs, and methods.

no_forbidden_include

Flag #include directives of libraries that must never be included.

no_global_using

Flag 'using namespace' directives and using declarations at namespace/global scope.

no_global_using_enum

Flag using enum declarations at namespace/global scope.

no_in_class_member_definition

Flag member functions whose body is written inside the class definition.

no_maybe_unused_param

Flag [[maybe_unused]] on function, method and lambda parameters.

no_new_in_gtest_setup

Flag new expressions inside a GTest setup function.

no_throw_paren

Flag throw-expressions that wrap the thrown expression in parentheses.

no_void_pointer_param

Forbid void * parameters in public and protected functions.

prefer_mstd_copy_move_macros

Flag hand-written deleted copy/move members that a macro should replace.