@@ -143,7 +143,7 @@ def _load_defaults(self, resources_path: str) -> tuple[str, str | None, set[str]
143
143
# Only a warning is used here, so that if running offline, the analysis can continue. Erroneous Semgrep files
144
144
# will be picked up at analysis time in this case.
145
145
warning_msg = (
146
- f"Running semgrep validation on { custom_rule_path } was with arguments "
146
+ f"Running semgrep validation on { custom_rule_path } with argument(s) "
147
147
f" { process .args } "
148
148
f" was not successful: { process .returncode } ."
149
149
" These custom rule(s) may not run successfully."
@@ -152,7 +152,7 @@ def _load_defaults(self, resources_path: str) -> tuple[str, str | None, set[str]
152
152
153
153
except (subprocess .CalledProcessError , subprocess .TimeoutExpired ) as semgrep_error :
154
154
warning_msg = (
155
- f"Unable to run semgrep validation on { custom_rule_path } with arguments "
155
+ f"Unable to run semgrep validation on { custom_rule_path } with argument(s) "
156
156
f"{ semgrep_commands } : { semgrep_error } ."
157
157
)
158
158
logger .warning (warning_msg )
@@ -306,13 +306,13 @@ def analyze(self, pypi_package_json: PyPIPackageJsonAsset) -> tuple[HeuristicRes
306
306
process = subprocess .run (semgrep_commands , check = True , capture_output = True ) # nosec B603
307
307
except (subprocess .CalledProcessError , subprocess .TimeoutExpired ) as semgrep_error :
308
308
error_msg = (
309
- f"Unable to run semgrep on { source_code_path } with arguments { semgrep_commands } : { semgrep_error } "
309
+ f"Unable to run semgrep on { source_code_path } with argument(s) { semgrep_commands } : { semgrep_error } "
310
310
)
311
311
logger .debug (error_msg )
312
312
raise HeuristicAnalyzerValueError (error_msg ) from semgrep_error
313
313
314
314
if process .returncode != 0 :
315
- error_msg = f"Error running semgrep on { source_code_path } with arguments " f" { process .args } "
315
+ error_msg = f"Error running semgrep on { source_code_path } with argument(s) " f" { process .args } "
316
316
logger .debug (error_msg )
317
317
raise HeuristicAnalyzerValueError (error_msg )
318
318
0 commit comments