Merge bitcoin/bitcoin#28628: lint: Include test_utxo_snapshots in lint_shell, fix linter errors

348e79f7c6 lint: Include test_utxo_snapshots in lint_shell (Fabian Jahr)

Pull request description:

  jamesob excluded `test_utxo_snapshots.sh` from the shell linter with this explanation: "Add the script to the shellcheck exception list since the quoted variables rule needs to be violated in order to get bitcoind to pick up on $EARLY_IBD_FLAGS." However, macrofake pointed out that single lines can be excluded from linting.

  This fixes one fixable rule violation, excludes the rest of the offending lines from the linter and then removes the exclusion of the `test_utxo_snapshots.sh` file. Also adds documentation.

ACKs for top commit:
  Empact:
    ACK 348e79f7c6
  maflcko:
    lgtm ACK 348e79f7c6
  pablomartin4btc:
    tACK 348e79f7c6

Tree-SHA512: a904cc1cc3c94488dfbd39ea69a3ef17259f991708a797009001669448fef81eed086ecbce1ec433988d88baef293849698e2e0eb86a969b949cc7ef93af7b4b
This commit is contained in:
fanquake
2023-10-17 09:48:33 +01:00
2 changed files with 11 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ def main():
reg = re.compile(r'src/[leveldb,secp256k1,minisketch]')
def should_exclude(fname: str) -> bool:
return bool(reg.match(fname)) or 'test_utxo_snapshots.sh' in fname
return bool(reg.match(fname))
# remove everything that doesn't match this regex
files[:] = [file for file in files if not should_exclude(file)]