diff --git a/scripts/public_symbols_checker.py b/scripts/public_symbols_checker.py index 05b7ad4abb4..c8bf7fd22e7 100644 --- a/scripts/public_symbols_checker.py +++ b/scripts/public_symbols_checker.py @@ -123,11 +123,11 @@ def remove_common_symbols(): del removed_symbols[file_path] -if added_symbols or removed_symbols: +# If a symbol is added and removed in the same commit, we consider it as not +# added or removed. +remove_common_symbols() - # If a symbol is added and removed in the same commit, we consider it - # as not added or removed. - remove_common_symbols() +if added_symbols or removed_symbols: print("The code in this branch adds the following public symbols:") print() for file_path_, symbols_ in added_symbols.items():