Merge lint_relaxer

This commit is contained in:
Luke Dashjr 2023-11-15 23:49:11 +00:00
commit 3f26eac129
6 changed files with 5 additions and 6 deletions

View File

@ -26,6 +26,7 @@ def module_name(path):
return path return path
if path.endswith(".h"): if path.endswith(".h"):
return path[:-2] return path[:-2]
return path
if path.endswith(".c"): if path.endswith(".c"):
return path[:-2] return path[:-2]
if path.endswith(".cpp"): if path.endswith(".cpp"):

View File

@ -9,8 +9,9 @@ performance-*,
-performance-inefficient-string-concatenation, -performance-inefficient-string-concatenation,
-performance-no-int-to-ptr, -performance-no-int-to-ptr,
-performance-noexcept-move-constructor, -performance-noexcept-move-constructor,
-performance-unnecessary-copy-initialization,
-performance-unnecessary-value-param, -performance-unnecessary-value-param,
readability-const-return-type, -readability-const-return-type,
readability-redundant-declaration, readability-redundant-declaration,
readability-redundant-string-init, readability-redundant-string-init,
' '

View File

@ -27,6 +27,7 @@ EXPECTED_CIRCULAR_DEPENDENCIES = (
# Temporary, removed in followup https://github.com/bitcoin/bitcoin/pull/24230 # Temporary, removed in followup https://github.com/bitcoin/bitcoin/pull/24230
"index/base -> node/context -> net_processing -> index/blockfilterindex -> index/base", "index/base -> node/context -> net_processing -> index/blockfilterindex -> index/base",
) )
EXPECTED_CIRCULAR_DEPENDENCIES = ()
CODE_DIR = "src" CODE_DIR = "src"
@ -49,6 +50,7 @@ def main():
) )
for dependency_str in dependencies_output.stdout.rstrip().split("\n"): for dependency_str in dependencies_output.stdout.rstrip().split("\n"):
if dependency_str == '': continue
circular_dependencies.append( circular_dependencies.append(
re.sub("^Circular dependency: ", "", dependency_str) re.sub("^Circular dependency: ", "", dependency_str)
) )

View File

@ -125,7 +125,6 @@ def main():
for duplicate in duplicates: for duplicate in duplicates:
print(duplicate) print(duplicate)
print("") print("")
exit_code = 1
# Check if code includes .cpp-files # Check if code includes .cpp-files
included_cpps = find_included_cpps() included_cpps = find_included_cpps()

View File

@ -34,7 +34,6 @@ def main():
except CalledProcessError as e: except CalledProcessError as e:
print(e.output.decode("utf-8"), end="") print(e.output.decode("utf-8"), end="")
print("Python dead code detection found some issues") print("Python dead code detection found some issues")
exit(1)
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -41,13 +41,10 @@ ENABLED = (
'E272,' # multiple spaces before keyword 'E272,' # multiple spaces before keyword
'E273,' # tab after keyword 'E273,' # tab after keyword
'E274,' # tab before keyword 'E274,' # tab before keyword
'E275,' # missing whitespace after keyword
'E304,' # blank lines found after function decorator 'E304,' # blank lines found after function decorator
'E306,' # expected 1 blank line before a nested definition
'E401,' # multiple imports on one line 'E401,' # multiple imports on one line
'E402,' # module level import not at top of file 'E402,' # module level import not at top of file
'E502,' # the backslash is redundant between brackets 'E502,' # the backslash is redundant between brackets
'E701,' # multiple statements on one line (colon)
'E702,' # multiple statements on one line (semicolon) 'E702,' # multiple statements on one line (semicolon)
'E703,' # statement ends with a semicolon 'E703,' # statement ends with a semicolon
'E711,' # comparison to None should be 'if cond is None:' 'E711,' # comparison to None should be 'if cond is None:'