aboutsummaryrefslogtreecommitdiffstats
path: root/docs/checks/README-skipped-base-method.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/checks/README-skipped-base-method.md')
-rw-r--r--docs/checks/README-skipped-base-method.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/checks/README-skipped-base-method.md b/docs/checks/README-skipped-base-method.md
new file mode 100644
index 00000000..4475987b
--- /dev/null
+++ b/docs/checks/README-skipped-base-method.md
@@ -0,0 +1,18 @@
+# skipped-base-method
+
+Warns when calling a method from the "grand-base class" instead of the base-class method.
+
+Example:
+class MyFrame : public QFrame
+{
+ Q_OBJECT
+public:
+ bool event(QEvent *ev) override
+ {
+ (...)
+ return QWidget::event(ev); // warning: Maybe you meant to call QFrame::changeEvent() instead [-Wclazy-skipped-base-method]
+ }
+};
+
+Try to avoid jumping over the direct base method. If you really need to then at least
+add a comment in the code, so people know it was intentional. Or even better, an clazy:exclude=skipped-base-method comment, which also sliences this warning.