================
@@ -0,0 +1,37 @@
+```{title} clang-tidy - readability-block-size
+```
+
+# readability-block-size
+
+This check warns when `if`, `else`, `for` or `while` blocks exceed a given
+number of lines of code, and thus flags control flow structures which are
+likely difficult to reason about due to their size.
+
+```cpp
+// This block will raise a warning if N > IfLineCountThreshold
+if (some_condition()){  // line #1
+  call_some_fn();       // line #2
+  // ...
+  do_something_else();  // line #N-1
+}                       // line #N
+```
+
+## Options
+
+```{option} IfLineCountThreshold
+
+This option sets the number of lines of code beyond which an `if` (or `else`)
+block will be flagged as too long. The default value is 20.
----------------
EugeneZelenko wrote:

```suggestion
block will be flagged as too long. The default value is `20`.
```

https://github.com/llvm/llvm-project/pull/219589
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to