Skip to content

Commit

Permalink
MissingCalls: don't account reinitializers
Browse files Browse the repository at this point in the history
  • Loading branch information
QiuhaoLi committed Aug 15, 2024
1 parent fe54eb7 commit 5f31381
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions slither/tools/upgradeability/checks/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ def _check(self):
all_init_functions_called = _get_all_internal_calls(most_derived_init) + [most_derived_init]
missing_calls = [f for f in all_init_functions if not f in all_init_functions_called]
for f in missing_calls:
# we don't account reinitializers
if any((m.name == "reinitializer") for m in f.modifiers):
continue
info = ["Missing call to ", f, " in ", most_derived_init, ".\n"]
json = self.generate_result(info)
results.append(json)
Expand Down

0 comments on commit 5f31381

Please sign in to comment.