cmake-examples/04-static-analysis
2018-11-17 11:30:09 +00:00
..
clang-analyzer Update to minimum CMake 3.5 2018-03-18 17:23:57 +00:00
clang-format Update to minimum CMake 3.5 2018-03-18 17:23:57 +00:00
cppcheck Update to minimum CMake 3.5 2018-03-18 17:23:57 +00:00
cppcheck-compile-commands raddd cppcheck-analysis target 2018-11-17 11:30:09 +00:00
README.adoc fix some typos and add missing link 2017-07-05 22:56:55 +01:00

= Static Analysis
:toc:
:toc-placement!:

toc::[]

# Introduction

Static analysis is the analysis of code without executing it. It can be
used to find common programming errors and enforce coding guidelines.
Examples of errors that can be found using static analysis tools
include:

* Out of bounds errors
* Memory leaks
* Usage of uninitialized variables
* Use of unsafe functions

Analysis tools can detect errors early and are becoming a standard tool
in most build chains. Some build tools such as
http://clang-analyzer.llvm.org/[Clang] include a build in static
analysis tool. However standalone tools also exist.

The examples here include using the following tools:

* http://cppcheck.sourceforge.net/[CppCheck]
* https://clang-analyzer.llvm.org/[Clang Static Analyzer]
* https://clang.llvm.org/docs/ClangFormat.html[Clang Format]