Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-05-12 17:13:21 +0200
committerMartin Hořeňovský2023-05-29 00:55:20 +0200
commitdba9197ec71ed64c6f08c7ce73f1af5bc3331f3c (patch)
tree9a18cdabb31645b4f5fdd46b3672dd6ff3d884f8 /docs
parentf60c15364bb4be1c9a34f19eac06f085828a2c5e (diff)
downloadcatch3-dba9197ec71ed64c6f08c7ce73f1af5bc3331f3c.tar.gz
Add new config option: STATIC_ANALYSIS_SUPPORT
Diffstat (limited to 'docs')
-rw-r--r--docs/configuration.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index d4421f3c..d6e159e5 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -15,6 +15,7 @@
[Enabling stringification](#enabling-stringification)<br>
[Disabling exceptions](#disabling-exceptions)<br>
[Overriding Catch's debug break (`-b`)](#overriding-catchs-debug-break--b)<br>
+[Static analysis support](#static-analysis-support)<br>
Catch2 is designed to "just work" as much as possible, and most of the
configuration options below are changed automatically during compilation,
@@ -264,6 +265,31 @@ The macro will be used as is, that is, `CATCH_BREAK_INTO_DEBUGGER();`
must compile and must break into debugger.
+## Static analysis support
+
+> Introduced in Catch2 X.Y.Z.
+
+Some parts of Catch2, e.g. `SECTION`s, can be hard for static analysis
+tools to reason about. Catch2 can change its internals to help static
+analysis tools reason about the tests.
+
+Catch2 automatically detects some static analysis tools (initial
+implementation checks for clang-tidy and Coverity), but you can override
+its detection (in either direction) via
+
+```
+CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT // force enables static analysis help
+CATCH_CONFIG_NO_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT // force disables static analysis help
+```
+
+_As the name suggests, this is currently experimental, and thus we provide
+no backwards compatibility guarantees._
+
+**DO NOT ENABLE THIS FOR BUILDS YOU INTEND TO RUN.** The changed internals
+are not meant to be runnable, only "scannable".
+
+
+
---
[Home](Readme.md#top)