Merge lint_relaxer-28+knots

This commit is contained in:
Luke Dashjr 2025-03-05 03:27:08 +00:00
commit efeece9f03
7 changed files with 4 additions and 10 deletions

View File

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

View File

@ -686,7 +686,6 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=
if not os.listdir(tmpdir):
os.rmdir(tmpdir)
all_passed = all_passed and coverage_passed
# Clean up dangling processes if any. This may only happen with --failfast option.
# Killing the process group will also terminate the current process but that is

View File

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

View File

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

View File

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

View File

@ -46,13 +46,9 @@ ENABLED = (
'E272,' # multiple spaces before keyword
'E273,' # tab after keyword
'E274,' # tab before keyword
'E275,' # missing whitespace after keyword
'E304,' # blank lines found after function decorator
'E306,' # expected 1 blank line before a nested definition
'E401,' # multiple imports on one line
'E402,' # module level import not at top of file
'E502,' # the backslash is redundant between brackets
'E701,' # multiple statements on one line (colon)
'E702,' # multiple statements on one line (semicolon)
'E703,' # statement ends with a semicolon
'E711,' # comparison to None should be 'if cond is None:'
@ -63,7 +59,6 @@ ENABLED = (
'E743,' # do not define functions named "l", "O", or "I"
'E901,' # SyntaxError: invalid syntax
'E902,' # TokenError: EOF in multi-line string
'F401,' # module imported but unused
'F402,' # import module from line N shadowed by loop variable
'F403,' # 'from foo_module import *' used; unable to detect undefined names
'F404,' # future import(s) name after other statements
@ -89,7 +84,6 @@ ENABLED = (
'F822,' # undefined name name in __all__
'F823,' # local variable name … referenced before assignment
'F831,' # duplicate argument name in function definition
'F841,' # local variable 'foo' is assigned to but never used
'W191,' # indentation contains tabs
'W291,' # trailing whitespace
'W292,' # no newline at end of file

View File

@ -376,7 +376,7 @@ fn lint_includes_build_config() -> LintResult {
"--files-with-matches"
},
if mode {
"^#include <config/bitcoin-config.h> // IWYU pragma: keep$"
"#include <config/bitcoin-config.h>"
} else {
"#include <config/bitcoin-config.h>" // Catch redundant includes with and without the IWYU pragma
},