mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-13 03:30:42 +02:00
Merge lint_relaxer
This commit is contained in:
commit
3f26eac129
@ -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"):
|
||||||
|
@ -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,
|
||||||
'
|
'
|
||||||
|
@ -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)
|
||||||
)
|
)
|
||||||
|
@ -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()
|
||||||
|
@ -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__":
|
||||||
|
@ -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:'
|
||||||
|
Loading…
Reference in New Issue
Block a user