We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
CPU_COUNT
1 parent 59955ea commit 78e0a0cCopy full SHA for 78e0a0c
2 files changed
codesectools/sasts/tools/Cppcheck/sast.py
@@ -13,6 +13,7 @@
13
SASTRequirements,
14
)
15
from codesectools.sasts.tools.Cppcheck.parser import CppcheckAnalysisResult
16
+from codesectools.utils import CPU_COUNT
17
18
19
class CppcheckSAST(PrebuiltBuildlessSAST):
@@ -51,6 +52,7 @@ class CppcheckSAST(PrebuiltBuildlessSAST):
51
52
"--xml",
53
"--output-file=cppcheck_output.xml",
54
"--cppcheck-build-dir={tempdir}",
55
+ f"-j{CPU_COUNT}",
56
]
57
58
valid_codes = [0]
codesectools/utils.py
@@ -223,3 +223,6 @@ def shorten_path(p: str) -> str:
223
if len(path.parts) > 3:
224
return str(Path("...") / path.parts[-2] / path.parts[-1])
225
return p
226
+
227
228
+CPU_COUNT = os.cpu_count()
0 commit comments