Extract override modifier

This commit is contained in:
Tamas Vajk
2022-04-07 09:30:03 +02:00
committed by Ian Lynagh
parent 92de139805
commit 505ccbbcf6
3 changed files with 5 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ from OverridingMethod m, Method overridden
where
m.fromSource() and
m.overrides(overridden) and
not m.hasModifier("override") and
not m.isOverrideAnnotated() and
not exists(FunctionalExpr mref | mref.asMethod() = m)
select m, "This method overrides $@; it is advisable to add an Override annotation.", overridden,

View File

@@ -1,3 +0,0 @@
| Test.kt:16:14:18:5 | m | This method overrides $@; it is advisable to add an Override annotation. | Test.kt:2:10:4:5 | m | A.m |
| Test.kt:22:14:22:24 | o | This method overrides $@; it is advisable to add an Override annotation. | Test.kt:12:5:12:11 | o | I.o |
| Test.kt:24:14:24:22 | getP | This method overrides $@; it is advisable to add an Override annotation. | Test.kt:8:10:8:18 | getP | A.getP |