doxygen: document on the main page that we have access to syntax tree, symbol database and library.
This commit is contained in:
parent
e0eb000ac3
commit
c3f101e043
20
cli/main.cpp
20
cli/main.cpp
|
@ -25,10 +25,19 @@
|
||||||
* @section overview_sec Overview
|
* @section overview_sec Overview
|
||||||
* Cppcheck is a simple tool for static analysis of C/C++ code.
|
* Cppcheck is a simple tool for static analysis of C/C++ code.
|
||||||
*
|
*
|
||||||
* The method used is to first tokenize the source code and then analyse the token list.
|
* When you write a checker you have access to:
|
||||||
* In the token list, the tokens are stored in plain text.
|
* - %Token list = the tokenized code
|
||||||
|
* - Syntax tree = Syntax tree of each expression
|
||||||
|
* - SymbolDatabase = Information about all types/variables/functions/etc
|
||||||
|
* in the current translation unit
|
||||||
|
* - Library = Information about functions
|
||||||
*
|
*
|
||||||
* The checks are written in C++. The checks are addons that can be easily added/removed.
|
* Use --debug on the command line to see debug output for the token list
|
||||||
|
* and the syntax tree. If both --debug and --verbose is used, the symbol
|
||||||
|
* database is also written.
|
||||||
|
*
|
||||||
|
* The checks are written in C++. The checks are addons that can be
|
||||||
|
* easily added/removed.
|
||||||
*
|
*
|
||||||
* @section writing_checks_sec Writing a check
|
* @section writing_checks_sec Writing a check
|
||||||
* Below is a simple example of a check that detect division with zero:
|
* Below is a simple example of a check that detect division with zero:
|
||||||
|
@ -45,8 +54,9 @@ void CheckOther::checkZeroDivision()
|
||||||
@endcode
|
@endcode
|
||||||
*
|
*
|
||||||
* The function Token::Match is often used in the checks. Through it
|
* The function Token::Match is often used in the checks. Through it
|
||||||
* you can match tokens against patterns.
|
* you can match tokens against patterns. It is currently not possible
|
||||||
*
|
* to write match expressions that uses the syntax tree, the symbol database,
|
||||||
|
* nor the library. Only the token list is used.
|
||||||
*
|
*
|
||||||
* @section checkclass_sec Creating a new check class from scratch
|
* @section checkclass_sec Creating a new check class from scratch
|
||||||
* %Check classes inherit from the Check class. The Check class specifies the interface that you must use.
|
* %Check classes inherit from the Check class. The Check class specifies the interface that you must use.
|
||||||
|
|
Loading…
Reference in New Issue