Skip to content

Commit

Permalink
[clang-tidy] Adding static analyzer check to list of clang-tidy checks
Browse files Browse the repository at this point in the history
Summary:
Since clang-tidy supports use of the static analyzer there
should be documentation of how to invoke the static analyzer
checks.

Reviewers: JonasToth, aaron.ballman, NoQ, Szelethus

Reviewed By: aaron.ballman

Subscribers: nickdesaulniers, lebedev.ri, jfb, NoQ, Eugene.Zelenko, xazax.hun, baloghadamsoftware, a.sidorin, Szelethus, donat.nagy, dkrupp, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64454

llvm-svn: 367694
nhukc committed Aug 2, 2019
1 parent 383d760 commit 6722923
Showing 86 changed files with 993 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.CallAndMessage
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-callandmessage

clang-analyzer-core.CallAndMessage
==================================

The clang-analyzer-core.CallAndMessage check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-callandmessage>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.DivideZero
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-dividezero

clang-analyzer-core.DivideZero
==============================

The clang-analyzer-core.DivideZero check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-dividezero>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-core.DynamicTypePropagation

clang-analyzer-core.DynamicTypePropagation
==========================================

Generate dynamic type information
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.NonNullParamChecker
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-nonnullparamchecker

clang-analyzer-core.NonNullParamChecker
=======================================

The clang-analyzer-core.NonNullParamChecker check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-nonnullparamchecker>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.NullDereference
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-nulldereference

clang-analyzer-core.NullDereference
===================================

The clang-analyzer-core.NullDereference check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-nulldereference>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.StackAddressEscape
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-stackaddressescape

clang-analyzer-core.StackAddressEscape
======================================

The clang-analyzer-core.StackAddressEscape check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-stackaddressescape>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.UndefinedBinaryOperatorResult
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-undefinedbinaryoperatorresult

clang-analyzer-core.UndefinedBinaryOperatorResult
=================================================

The clang-analyzer-core.UndefinedBinaryOperatorResult check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-undefinedbinaryoperatorresult>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.VLASize
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-vlasize

clang-analyzer-core.VLASize
===========================

The clang-analyzer-core.VLASize check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-vlasize>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.uninitialized.ArraySubscript
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-uninitialized-arraysubscript

clang-analyzer-core.uninitialized.ArraySubscript
================================================

The clang-analyzer-core.uninitialized.ArraySubscript check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-uninitialized-arraysubscript>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.uninitialized.Assign
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-uninitialized-assign

clang-analyzer-core.uninitialized.Assign
========================================

The clang-analyzer-core.uninitialized.Assign check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-uninitialized-assign>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.uninitialized.Branch
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-uninitialized-branch

clang-analyzer-core.uninitialized.Branch
========================================

The clang-analyzer-core.uninitialized.Branch check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-uninitialized-branch>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-core.uninitialized.CapturedBlockVariable

clang-analyzer-core.uninitialized.CapturedBlockVariable
=======================================================

Check for blocks that capture uninitialized values
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-core.uninitialized.UndefReturn
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#core-uninitialized-undefreturn

clang-analyzer-core.uninitialized.UndefReturn
=============================================

The clang-analyzer-core.uninitialized.UndefReturn check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#core-uninitialized-undefreturn>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-cplusplus.InnerPointer

clang-analyzer-cplusplus.InnerPointer
=====================================

Check for inner pointers of C++ containers used after re/deallocation
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-cplusplus.Move
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-move

clang-analyzer-cplusplus.Move
=============================

The clang-analyzer-cplusplus.Move check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-move>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-cplusplus.NewDelete
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-newdelete

clang-analyzer-cplusplus.NewDelete
==================================

The clang-analyzer-cplusplus.NewDelete check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-newdelete>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-cplusplus.NewDeleteLeaks
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-newdeleteleaks

clang-analyzer-cplusplus.NewDeleteLeaks
=======================================

The clang-analyzer-cplusplus.NewDeleteLeaks check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-newdeleteleaks>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-deadcode.DeadStores
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#deadcode-deadstores

clang-analyzer-deadcode.DeadStores
==================================

The clang-analyzer-deadcode.DeadStores check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#deadcode-deadstores>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-nullability.NullPassedToNonnull
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#nullability-nullpassedtononnull

clang-analyzer-nullability.NullPassedToNonnull
==============================================

The clang-analyzer-nullability.NullPassedToNonnull check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#nullability-nullpassedtononnull>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-nullability.NullReturnedFromNonnull
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#nullability-nullreturnedfromnonnull

clang-analyzer-nullability.NullReturnedFromNonnull
==================================================

The clang-analyzer-nullability.NullReturnedFromNonnull check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#nullability-nullreturnedfromnonnull>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-nullability.NullableDereferenced
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#nullability-nullabledereferenced

clang-analyzer-nullability.NullableDereferenced
===============================================

The clang-analyzer-nullability.NullableDereferenced check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#nullability-nullabledereferenced>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-nullability.NullablePassedToNonnull
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#nullability-nullablepassedtononnull

clang-analyzer-nullability.NullablePassedToNonnull
==================================================

The clang-analyzer-nullability.NullablePassedToNonnull check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#nullability-nullablepassedtononnull>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-nullability.NullableReturnedFromNonnull

clang-analyzer-nullability.NullableReturnedFromNonnull
======================================================

Warns when a nullable pointer is returned from a function that has _Nonnull return type.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-optin.cplusplus.UninitializedObject
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#optin-cplusplus-uninitializedobject

clang-analyzer-optin.cplusplus.UninitializedObject
==================================================

The clang-analyzer-optin.cplusplus.UninitializedObject check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#optin-cplusplus-uninitializedobject>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-optin.cplusplus.VirtualCall
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#optin-cplusplus-virtualcall

clang-analyzer-optin.cplusplus.VirtualCall
==========================================

The clang-analyzer-optin.cplusplus.VirtualCall check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#optin-cplusplus-virtualcall>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-optin.mpi.MPI-Checker
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#optin-mpi-mpi-checker

clang-analyzer-optin.mpi.MPI-Checker
====================================

The clang-analyzer-optin.mpi.MPI-Checker check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#optin-mpi-mpi-checker>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-optin.osx.OSObjectCStyleCast

clang-analyzer-optin.osx.OSObjectCStyleCast
===========================================

Checker for C-style casts of OSObjects
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#optin-osx-cocoa-localizability-emptylocalizationcontextchecker

clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker
=============================================================================

The clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#optin-osx-cocoa-localizability-emptylocalizationcontextchecker>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#optin-osx-cocoa-localizability-nonlocalizedstringchecker

clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker
=======================================================================

The clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#optin-osx-cocoa-localizability-nonlocalizedstringchecker>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-optin.performance.GCDAntipattern

clang-analyzer-optin.performance.GCDAntipattern
===============================================

Check for performance anti-patterns when using Grand Central Dispatch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-optin.performance.Padding

clang-analyzer-optin.performance.Padding
========================================

Check for excessively padded structs.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-optin.portability.UnixAPI

clang-analyzer-optin.portability.UnixAPI
========================================

Finds implementation-defined behavior in UNIX/Posix functions
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.API
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-api

clang-analyzer-osx.API
======================

The clang-analyzer-osx.API check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-api>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-osx.MIG

clang-analyzer-osx.MIG
======================

Find violations of the Mach Interface Generator calling convention
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-osx.NumberObjectConversion

clang-analyzer-osx.NumberObjectConversion
=========================================

Check for erroneous conversions of objects representing numbers into numbers
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-osx.OSObjectRetainCount

clang-analyzer-osx.OSObjectRetainCount
======================================

Check for leaks and improper reference count management for OSObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-osx.ObjCProperty

clang-analyzer-osx.ObjCProperty
===============================

Check for proper uses of Objective-C properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.SecKeychainAPI
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-seckeychainapi

clang-analyzer-osx.SecKeychainAPI
=================================

The clang-analyzer-osx.SecKeychainAPI check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-seckeychainapi>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.AtSync
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-atsync

clang-analyzer-osx.cocoa.AtSync
===============================

The clang-analyzer-osx.cocoa.AtSync check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-atsync>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.AutoreleaseWrite

clang-analyzer-osx.cocoa.AutoreleaseWrite
=========================================

Warn about potentially crashing writes to autoreleasing objects from different autoreleasing pools in Objective-C
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.ClassRelease
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-classrelease

clang-analyzer-osx.cocoa.ClassRelease
=====================================

The clang-analyzer-osx.cocoa.ClassRelease check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-classrelease>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.Dealloc
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-dealloc

clang-analyzer-osx.cocoa.Dealloc
================================

The clang-analyzer-osx.cocoa.Dealloc check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-dealloc>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.IncompatibleMethodTypes
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-incompatiblemethodtypes

clang-analyzer-osx.cocoa.IncompatibleMethodTypes
================================================

The clang-analyzer-osx.cocoa.IncompatibleMethodTypes check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-incompatiblemethodtypes>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.Loops

clang-analyzer-osx.cocoa.Loops
==============================

Improved modeling of loops using Cocoa collection types
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.MissingSuperCall

clang-analyzer-osx.cocoa.MissingSuperCall
=========================================

Warn about Objective-C methods that lack a necessary call to super
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.NSAutoreleasePool
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-nsautoreleasepool

clang-analyzer-osx.cocoa.NSAutoreleasePool
==========================================

The clang-analyzer-osx.cocoa.NSAutoreleasePool check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-nsautoreleasepool>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.NSError
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-nserror

clang-analyzer-osx.cocoa.NSError
================================

The clang-analyzer-osx.cocoa.NSError check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-nserror>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.NilArg
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-nilarg

clang-analyzer-osx.cocoa.NilArg
===============================

The clang-analyzer-osx.cocoa.NilArg check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-nilarg>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.NonNilReturnValue

clang-analyzer-osx.cocoa.NonNilReturnValue
==========================================

Model the APIs that are guaranteed to return a non-nil value
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.ObjCGenerics
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-objcgenerics

clang-analyzer-osx.cocoa.ObjCGenerics
=====================================

The clang-analyzer-osx.cocoa.ObjCGenerics check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-objcgenerics>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.RetainCount
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-retaincount

clang-analyzer-osx.cocoa.RetainCount
====================================

The clang-analyzer-osx.cocoa.RetainCount check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-retaincount>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.RunLoopAutoreleaseLeak

clang-analyzer-osx.cocoa.RunLoopAutoreleaseLeak
===============================================

Check for leaked memory in autorelease pools that will never be drained
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.SelfInit
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-selfinit

clang-analyzer-osx.cocoa.SelfInit
=================================

The clang-analyzer-osx.cocoa.SelfInit check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-selfinit>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.SuperDealloc
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-superdealloc

clang-analyzer-osx.cocoa.SuperDealloc
=====================================

The clang-analyzer-osx.cocoa.SuperDealloc check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-superdealloc>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.UnusedIvars
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-unusedivars

clang-analyzer-osx.cocoa.UnusedIvars
====================================

The clang-analyzer-osx.cocoa.UnusedIvars check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-unusedivars>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.cocoa.VariadicMethodTypes
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-variadicmethodtypes

clang-analyzer-osx.cocoa.VariadicMethodTypes
============================================

The clang-analyzer-osx.cocoa.VariadicMethodTypes check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-variadicmethodtypes>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.coreFoundation.CFError
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-cferror

clang-analyzer-osx.coreFoundation.CFError
=========================================

The clang-analyzer-osx.coreFoundation.CFError check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-cferror>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.coreFoundation.CFNumber
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-cfnumber

clang-analyzer-osx.coreFoundation.CFNumber
==========================================

The clang-analyzer-osx.coreFoundation.CFNumber check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-cfnumber>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.coreFoundation.CFRetainRelease
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-cfretainrelease

clang-analyzer-osx.coreFoundation.CFRetainRelease
=================================================

The clang-analyzer-osx.coreFoundation.CFRetainRelease check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-cfretainrelease>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.coreFoundation.containers.OutOfBounds
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-containers-outofbounds

clang-analyzer-osx.coreFoundation.containers.OutOfBounds
========================================================

The clang-analyzer-osx.coreFoundation.containers.OutOfBounds check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-containers-outofbounds>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-osx.coreFoundation.containers.PointerSizedValues
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-containers-pointersizedvalues

clang-analyzer-osx.coreFoundation.containers.PointerSizedValues
===============================================================

The clang-analyzer-osx.coreFoundation.containers.PointerSizedValues check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-containers-pointersizedvalues>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.FloatLoopCounter
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-floatloopcounter

clang-analyzer-security.FloatLoopCounter
========================================

The clang-analyzer-security.FloatLoopCounter check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-floatloopcounter>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-deprecatedorunsafebufferhandling

clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
====================================================================

The clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-deprecatedorunsafebufferhandling>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.UncheckedReturn
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-uncheckedreturn

clang-analyzer-security.insecureAPI.UncheckedReturn
===================================================

The clang-analyzer-security.insecureAPI.UncheckedReturn check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-uncheckedreturn>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.bcmp
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bcmp

clang-analyzer-security.insecureAPI.bcmp
========================================

The clang-analyzer-security.insecureAPI.bcmp check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bcmp>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.bcopy
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bcopy

clang-analyzer-security.insecureAPI.bcopy
=========================================

The clang-analyzer-security.insecureAPI.bcopy check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bcopy>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.bzero
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bzero

clang-analyzer-security.insecureAPI.bzero
=========================================

The clang-analyzer-security.insecureAPI.bzero check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bzero>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.getpw
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-getpw

clang-analyzer-security.insecureAPI.getpw
=========================================

The clang-analyzer-security.insecureAPI.getpw check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-getpw>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.gets
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-gets

clang-analyzer-security.insecureAPI.gets
========================================

The clang-analyzer-security.insecureAPI.gets check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-gets>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.mkstemp
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-mkstemp

clang-analyzer-security.insecureAPI.mkstemp
===========================================

The clang-analyzer-security.insecureAPI.mkstemp check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-mkstemp>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.mktemp
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-mktemp

clang-analyzer-security.insecureAPI.mktemp
==========================================

The clang-analyzer-security.insecureAPI.mktemp check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-mktemp>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.rand
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-rand

clang-analyzer-security.insecureAPI.rand
========================================

The clang-analyzer-security.insecureAPI.rand check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-rand>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.strcpy
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-strcpy

clang-analyzer-security.insecureAPI.strcpy
==========================================

The clang-analyzer-security.insecureAPI.strcpy check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-strcpy>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-security.insecureAPI.vfork
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-vfork

clang-analyzer-security.insecureAPI.vfork
=========================================

The clang-analyzer-security.insecureAPI.vfork check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-vfork>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-unix.API
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#unix-api

clang-analyzer-unix.API
=======================

The clang-analyzer-unix.API check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#unix-api>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-unix.Malloc
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#unix-malloc

clang-analyzer-unix.Malloc
==========================

The clang-analyzer-unix.Malloc check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#unix-malloc>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-unix.MallocSizeof
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#unix-mallocsizeof

clang-analyzer-unix.MallocSizeof
================================

The clang-analyzer-unix.MallocSizeof check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#unix-mallocsizeof>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-unix.MismatchedDeallocator
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#unix-mismatcheddeallocator

clang-analyzer-unix.MismatchedDeallocator
=========================================

The clang-analyzer-unix.MismatchedDeallocator check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#unix-mismatcheddeallocator>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-unix.Vfork
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#unix-vfork

clang-analyzer-unix.Vfork
=========================

The clang-analyzer-unix.Vfork check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#unix-vfork>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-unix.cstring.BadSizeArg
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#unix-cstring-badsizearg

clang-analyzer-unix.cstring.BadSizeArg
======================================

The clang-analyzer-unix.cstring.BadSizeArg check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#unix-cstring-badsizearg>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. title:: clang-tidy - clang-analyzer-unix.cstring.NullArg
.. meta::
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#unix-cstring-nullarg

clang-analyzer-unix.cstring.NullArg
===================================

The clang-analyzer-unix.cstring.NullArg check is an alias, please see
`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#unix-cstring-nullarg>`_
for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-valist.CopyToSelf

clang-analyzer-valist.CopyToSelf
================================

Check for va_lists which are copied onto itself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-valist.Uninitialized

clang-analyzer-valist.Uninitialized
===================================

Check for usages of uninitialized (or already released) va_lists.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. title:: clang-tidy - clang-analyzer-valist.Unterminated

clang-analyzer-valist.Unterminated
==================================

Check for va_lists which are not released by a va_end call.
148 changes: 148 additions & 0 deletions clang-tools-extra/docs/clang-tidy/checks/gen-static-analyzer-docs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
"""
Generates documentation based off the available static analyzers checks
References Checkers.td to determine what checks exist
"""

import argparse
import subprocess
import json
import os
import re

"""Get path of script so files are always in correct directory"""
__location__ = os.path.realpath(
os.path.join(os.getcwd(), os.path.dirname(__file__)))

"""Get dict of checker related info and parse for full check names
Returns:
checkers: dict of checker info
"""
def get_checkers(checkers_td_directory):
p = subprocess.Popen(["llvm-tblgen", "--dump-json", "-I",
checkers_td_directory, checkers_td_directory+"Checkers.td"],
stdout=subprocess.PIPE)
table_entries = json.loads(p.communicate()[0])
documentable_checkers = []
checkers = table_entries["!instanceof"]["Checker"]
packages = table_entries["!instanceof"]["Package"]

for checker_ in checkers:
checker = table_entries[checker_]
checker_name = checker["CheckerName"]
package_ = checker["ParentPackage"]["def"]
package = table_entries[package_]
package_name = package["PackageName"]
checker_package_prefix = package_name
parent_package_ = package["ParentPackage"]
hidden = (checker["Hidden"] != 0) or (package["Hidden"] != 0)

while(parent_package_ != None):
parent_package = table_entries[parent_package_["def"]]
checker_package_prefix = parent_package["PackageName"] + "." + checker_package_prefix
hidden = hidden or parent_package["Hidden"] != 0
parent_package_ = parent_package["ParentPackage"]

full_package_name = "clang-analyzer-" + checker_package_prefix + "." + checker_name
anchor_url = re.sub("\.", "-", checker_package_prefix + "." + checker_name).lower()

if(not hidden and "alpha" not in full_package_name.lower()):
checker["FullPackageName"] = full_package_name
checker["AnchorUrl"] = anchor_url
documentable_checkers.append(checker)

documentable_checkers.sort(key=lambda x: x["FullPackageName"])
return documentable_checkers

"""Generate documentation for checker
Args:
checker: Checker for which to generate documentation.
only_help_text: Generate documentation based off the checker description.
Used when there is no other documentation to link to.
"""
def generate_documentation(checker, only_help_text=False):
with open(os.path.join(__location__, checker["FullPackageName"]+".rst"),"w") as f:
f.write(".. title:: clang-tidy - %s\n" % checker["FullPackageName"])
if(not only_help_text):
f.write(".. meta::\n")
f.write(" :http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#%s\n" % checker["AnchorUrl"])
f.write("\n")
f.write("%s\n" % checker["FullPackageName"])
f.write("=" * len(checker["FullPackageName"]) + "\n")
f.write("\n")
if(only_help_text):
f.write("%s\n" % checker["HelpText"])
else:
f.write("The %s check is an alias, please see\n" % checker["FullPackageName"])
f.write("`Clang Static Analyzer Available Checkers <https://clang.llvm.org/docs/analyzer/checkers.html#%s>`_\n" % checker["AnchorUrl"])
f.write("for more information.\n")
f.close()

"""Update list.rst to include the new checks
Args:
checkers: dict acquired from get_checkers()
"""
def update_documentation_list(checkers):
with open(os.path.join(__location__, "list.rst"), "r+") as f:
f_text = f.read()
header, check_text= f_text.split(".. toctree::\n")
checks = check_text.split("\n")
for checker in checkers:
if((" %s" % checker["FullPackageName"]) not in checks):
checks.append(" %s" % checker["FullPackageName"])
checks.sort()

#Overwrite file with new data
f.seek(0)
f.write(header)
f.write(".. toctree::")
for check in checks:
f.write("%s\n" % check)
f.close()

default_path_monorepo = '../../../../clang/include/clang/StaticAnalyzer/Checkers/'
default_path_in_tree = '../../../../../include/clang/StaticAnalyzer/Checkers/'

def parse_arguments():
"""Set up and parse command-line arguments
Returns:
file_path: Path to Checkers.td"""
usage = """Parse Checkers.td to generate documentation for static analyzer checks"""
parse = argparse.ArgumentParser(description=usage)

file_path_help = ("""Path to Checkers directory
defaults to ../../../../clang/include/clang/StaticAnalyzer/Checkers/ if it exists
then to ../../../../../include/clang/StaticAnalyzer/Checkers/""")

default_path=None
if(os.path.exists(default_path_monorepo)):
default_path = default_path_monorepo
elif(os.path.exists(default_path_in_tree)):
default_path = default_path_in_tree

parse.add_argument("file", type=str, help=file_path_help, nargs='?', default=default_path)
args = parse.parse_args()

if(args.file is None):
print("Could not find Checkers directory. Please see -h")
exit(1)

return args.file


def main():
file_path = parse_arguments()
checkers = get_checkers(file_path)
for checker in checkers:
#No documentation nor alpha documentation
if(checker["Documentation"][1] == 0 and checker["Documentation"][0] == 0):
generate_documentation(checker, True)
else:
generate_documentation(checker)
print("Generated documentation for: %s" % checker["FullPackageName"])
update_documentation_list(checkers)

if __name__ == '__main__':
main()
85 changes: 85 additions & 0 deletions clang-tools-extra/docs/clang-tidy/checks/list.rst
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ Clang-Tidy Checks
=================

.. toctree::

abseil-duration-addition
abseil-duration-comparison
abseil-duration-conversion-cast
@@ -102,6 +103,90 @@ Clang-Tidy Checks
cert-msc51-cpp
cert-oop11-cpp (redirects to performance-move-constructor-init) <cert-oop11-cpp>
cert-oop54-cpp (redirects to bugprone-unhandled-self-assignment) <cert-oop54-cpp>
clang-analyzer-core.CallAndMessage
clang-analyzer-core.DivideZero
clang-analyzer-core.DynamicTypePropagation
clang-analyzer-core.NonNullParamChecker
clang-analyzer-core.NullDereference
clang-analyzer-core.StackAddressEscape
clang-analyzer-core.UndefinedBinaryOperatorResult
clang-analyzer-core.VLASize
clang-analyzer-core.uninitialized.ArraySubscript
clang-analyzer-core.uninitialized.Assign
clang-analyzer-core.uninitialized.Branch
clang-analyzer-core.uninitialized.CapturedBlockVariable
clang-analyzer-core.uninitialized.UndefReturn
clang-analyzer-cplusplus.InnerPointer
clang-analyzer-cplusplus.Move
clang-analyzer-cplusplus.NewDelete
clang-analyzer-cplusplus.NewDeleteLeaks
clang-analyzer-deadcode.DeadStores
clang-analyzer-nullability.NullPassedToNonnull
clang-analyzer-nullability.NullReturnedFromNonnull
clang-analyzer-nullability.NullableDereferenced
clang-analyzer-nullability.NullablePassedToNonnull
clang-analyzer-nullability.NullableReturnedFromNonnull
clang-analyzer-optin.cplusplus.UninitializedObject
clang-analyzer-optin.cplusplus.VirtualCall
clang-analyzer-optin.mpi.MPI-Checker
clang-analyzer-optin.osx.OSObjectCStyleCast
clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker
clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker
clang-analyzer-optin.performance.GCDAntipattern
clang-analyzer-optin.performance.Padding
clang-analyzer-optin.portability.UnixAPI
clang-analyzer-osx.API
clang-analyzer-osx.MIG
clang-analyzer-osx.NumberObjectConversion
clang-analyzer-osx.OSObjectRetainCount
clang-analyzer-osx.ObjCProperty
clang-analyzer-osx.SecKeychainAPI
clang-analyzer-osx.cocoa.AtSync
clang-analyzer-osx.cocoa.AutoreleaseWrite
clang-analyzer-osx.cocoa.ClassRelease
clang-analyzer-osx.cocoa.Dealloc
clang-analyzer-osx.cocoa.IncompatibleMethodTypes
clang-analyzer-osx.cocoa.Loops
clang-analyzer-osx.cocoa.MissingSuperCall
clang-analyzer-osx.cocoa.NSAutoreleasePool
clang-analyzer-osx.cocoa.NSError
clang-analyzer-osx.cocoa.NilArg
clang-analyzer-osx.cocoa.NonNilReturnValue
clang-analyzer-osx.cocoa.ObjCGenerics
clang-analyzer-osx.cocoa.RetainCount
clang-analyzer-osx.cocoa.RunLoopAutoreleaseLeak
clang-analyzer-osx.cocoa.SelfInit
clang-analyzer-osx.cocoa.SuperDealloc
clang-analyzer-osx.cocoa.UnusedIvars
clang-analyzer-osx.cocoa.VariadicMethodTypes
clang-analyzer-osx.coreFoundation.CFError
clang-analyzer-osx.coreFoundation.CFNumber
clang-analyzer-osx.coreFoundation.CFRetainRelease
clang-analyzer-osx.coreFoundation.containers.OutOfBounds
clang-analyzer-osx.coreFoundation.containers.PointerSizedValues
clang-analyzer-security.FloatLoopCounter
clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
clang-analyzer-security.insecureAPI.UncheckedReturn
clang-analyzer-security.insecureAPI.bcmp
clang-analyzer-security.insecureAPI.bcopy
clang-analyzer-security.insecureAPI.bzero
clang-analyzer-security.insecureAPI.getpw
clang-analyzer-security.insecureAPI.gets
clang-analyzer-security.insecureAPI.mkstemp
clang-analyzer-security.insecureAPI.mktemp
clang-analyzer-security.insecureAPI.rand
clang-analyzer-security.insecureAPI.strcpy
clang-analyzer-security.insecureAPI.vfork
clang-analyzer-unix.API
clang-analyzer-unix.Malloc
clang-analyzer-unix.MallocSizeof
clang-analyzer-unix.MismatchedDeallocator
clang-analyzer-unix.Vfork
clang-analyzer-unix.cstring.BadSizeArg
clang-analyzer-unix.cstring.NullArg
clang-analyzer-valist.CopyToSelf
clang-analyzer-valist.Uninitialized
clang-analyzer-valist.Unterminated
cppcoreguidelines-avoid-c-arrays (redirects to modernize-avoid-c-arrays) <cppcoreguidelines-avoid-c-arrays>
cppcoreguidelines-avoid-goto
cppcoreguidelines-avoid-magic-numbers (redirects to readability-magic-numbers) <cppcoreguidelines-avoid-magic-numbers>

0 comments on commit 6722923

Please sign in to comment.