Skip to content

Commit 328ad1e

Browse files
committed
chore: grammatical error in error messages
Signed-off-by: Carl Flottmann <[email protected]>
1 parent 44296de commit 328ad1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/macaron/malware_analyzer/pypi_heuristics/sourcecode/pypi_sourcecode_analyzer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def _load_defaults(self, resources_path: str) -> tuple[str, str | None, set[str]
143143
# Only a warning is used here, so that if running offline, the analysis can continue. Erroneous Semgrep files
144144
# will be picked up at analysis time in this case.
145145
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)"
147147
f" {process.args} "
148148
f" was not successful: {process.returncode}."
149149
" 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]
152152

153153
except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as semgrep_error:
154154
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) "
156156
f"{semgrep_commands}: {semgrep_error}."
157157
)
158158
logger.warning(warning_msg)
@@ -306,13 +306,13 @@ def analyze(self, pypi_package_json: PyPIPackageJsonAsset) -> tuple[HeuristicRes
306306
process = subprocess.run(semgrep_commands, check=True, capture_output=True) # nosec B603
307307
except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as semgrep_error:
308308
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}"
310310
)
311311
logger.debug(error_msg)
312312
raise HeuristicAnalyzerValueError(error_msg) from semgrep_error
313313

314314
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}"
316316
logger.debug(error_msg)
317317
raise HeuristicAnalyzerValueError(error_msg)
318318

0 commit comments

Comments
 (0)