Ruff rules SIM for simplification by cclauss · Pull Request #337 · cpplint/cpplint · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 51 additions & 68 deletions cpplint.py
7 changes: 3 additions & 4 deletions cpplint_clitest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

"""Command Line interface integration test for cpplint.py."""

import contextlib
import glob
import os
import shutil
Expand All @@ -54,7 +55,7 @@ def run_shell_command(cmd: str, args: str, cwd="."):
cwd: from which folder to run.
"""
cmd, args = cmd.split(), args.split()
proc = subprocess.run(cmd + args, cwd=cwd, capture_output=True)
proc = subprocess.run(cmd + args, cwd=cwd, capture_output=True, check=False)
out, err = proc.stdout, proc.stderr

# Make output system-agnostic, aka support Windows
Expand Down Expand Up @@ -99,10 +100,8 @@ def setUpClass(cls):
shutil.copytree("samples", os.path.join(cls._root, "samples"))
cls.prepare_directory(cls._root)
except Exception:
try:
with contextlib.suppress(Exception):
cls.tearDownClass()
except Exception: # noqa: BLE001
pass
raise

@classmethod
Expand Down
13 changes: 5 additions & 8 deletions pyproject.toml