Update alert messages

This commit is contained in:
Joe Farebrother
2025-07-01 11:38:12 +01:00
parent d0daacd17e
commit 4f63528844
3 changed files with 4 additions and 4 deletions

View File

@@ -25,11 +25,11 @@ where
(
// Simple case: the method that should be called is directly overridden
mroStart = base.getScope() and
msg = "This deletion method does not call $@, which may leave $@ not properly cleaned up."
msg = "This delete method does not call $@, which may leave $@ not properly cleaned up."
or
// Only alert for a different mro base if there are no alerts for direct overrides
not missingCallToSuperclassDel(base, _, base.getScope()) and
msg =
"This deletion method does not call $@, which follows it in the MRO of $@, leaving it not properly cleaned up."
"This delete method does not call super().__del__, which may cause $@ to be missed during the cleanup of $@."
)
select base, msg, shouldCall, shouldCall.getQualifiedName(), mroStart, mroStart.getName()

View File

@@ -29,6 +29,6 @@ where
// Only alert for a different mro base if there are no alerts for direct overrides
not missingCallToSuperclassInit(base, _, base.getScope()) and
msg =
"This initialization method does not call $@, which follows it in the MRO of $@, leaving it partially initialized."
"This initialization method does not call super().__init__, which may cause $@ to be missed during the initialization of $@."
)
select base, msg, shouldCall, shouldCall.getQualifiedName(), mroStart, mroStart.getName()

View File

@@ -26,5 +26,5 @@ where
multipleCallsToSuperclassInit(meth, subMulti) and
calledMulti.getScope() = getADirectSuperclass+(subMulti.getScope())
)
select meth, "This initializer method calls $@ multiple times.", calledMulti,
select meth, "This initialization method calls $@ multiple times.", calledMulti,
calledMulti.getQualifiedName()