aboutsummaryrefslogtreecommitdiffstats
path: root/docs/checks/README-unused-non-trivial-variable.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/checks/README-unused-non-trivial-variable.md')
-rw-r--r--docs/checks/README-unused-non-trivial-variable.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/checks/README-unused-non-trivial-variable.md b/docs/checks/README-unused-non-trivial-variable.md
new file mode 100644
index 00000000..377344bd
--- /dev/null
+++ b/docs/checks/README-unused-non-trivial-variable.md
@@ -0,0 +1,16 @@
+# unused-non-trivial-variable
+
+ Warns about unused Qt value classes.
+ Compilers usually only warn when trivial classes are unused and don't emit warnings for non-trivial classes.
+
+ This check has a whitelist of common Qt classes such as containers, `QFont`, `QUrl`, etc and warns for those too.
+
+ See `UnusedNonTrivialType::isInterestingType(QualType t)` for a list of all types.
+
+ It's possible to extend the whitelist with user types, by setting the env variable `CLAZY_UNUSED_NON_TRIVIAL_VARIABLE_WHITELIST`.
+ It accepts a comma separate name of types.
+
+ It's possible to disable the whitelist via exporting `CLAZY_EXTRA_OPTIONS=unused-non-trivial-variable-no-whitelist`,
+ when this env variable is set clazy will warn for any unused non-trivial type. This will create many false positives,
+ such as RAII classes, but still useful to run at least once on your codebase. When disabling the whitelist this way it's also possible
+ to black list types, by setting a comma separated list of types to `CLAZY_UNUSED_NON_TRIVIAL_VARIABLE_BLACKLIST`