[PATCH] D71963: clang-tidy doc: Add the severities description
Sylvestre Ledru via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 28 09:34:33 PST 2019
sylvestre.ledru created this revision.
sylvestre.ledru added reviewers: dkrupp, aaron.ballman.
Herald added subscribers: rnkovacs, whisperity.
Herald added a project: clang.
I took the text from codechecker. Daniel Krupp ( @dkrupp ) wrote it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71963
Files:
clang-tools-extra/docs/clang-tidy/checks/list.rst
Index: clang-tools-extra/docs/clang-tidy/checks/list.rst
===================================================================
--- clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -403,6 +403,26 @@
`hicpp-use-override <hicpp-use-override.html>`_, `modernize-use-override <modernize-use-override.html>`_, "Yes", "low"
`hicpp-vararg <hicpp-vararg.html>`_, `cppcoreguidelines-pro-type-vararg <cppcoreguidelines-pro-type-vararg.html>`_, , "low"
+Severities
+----------
+
+.. Severities description are coming from Codechecker too:
+ https://github.com/Ericsson/codechecker/blob/master/config/config.md
+
+The following severity levels are defined:
+
+- **STYLE**: A true positive indicates that the source code is against a specific coding guideline or could improve readability.
+ Example: LLVM Coding Guideline: Do not use else or else if after something that interrupts control flow (break, return, throw, continue).
+
+- **LOW**: A true positive indicates that the source code is hard to read/understand or could be easily optimized.
+ Example: Unused variables, Dead code.
+
+- **MEDIUM**: A true positive indicates that the source code that may not cause a run-time error (yet), but against intuition and hence prone to error.
+ Example: Redundant expression in a condition.
+
+- **HIGH**: A true positive indicates that the source code will cause a run-time error.
+ Example of this category: out of bounds array access, division by zero, memory leak.
+
.. toctree::
:glob:
:hidden:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71963.235481.patch
Type: text/x-patch
Size: 1567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191228/393df280/attachment.bin>
More information about the cfe-commits
mailing list