about summary refs log tree commit diff
path: root/src/docs/never_loop.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/docs/never_loop.txt')
-rw-r--r--src/docs/never_loop.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/docs/never_loop.txt b/src/docs/never_loop.txt
new file mode 100644
index 00000000000..737ccf415cb
--- /dev/null
+++ b/src/docs/never_loop.txt
@@ -0,0 +1,15 @@
+### What it does
+Checks for loops that will always `break`, `return` or
+`continue` an outer loop.
+
+### Why is this bad?
+This loop never loops, all it does is obfuscating the
+code.
+
+### Example
+```
+loop {
+    ..;
+    break;
+}
+```
\ No newline at end of file