From 5a28e6c4531675f354eba1f0443214309a72bbdc Mon Sep 17 00:00:00 2001 From: Daniel D'Avella Date: Wed, 12 Mar 2025 16:23:04 -0400 Subject: [PATCH] Disable noisy log message by default --- src/codemodder/codemodder.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/codemodder/codemodder.py b/src/codemodder/codemodder.py index 93c86b04..821c6bef 100644 --- a/src/codemodder/codemodder.py +++ b/src/codemodder/codemodder.py @@ -134,6 +134,7 @@ def run( codemod_registry: registry.CodemodRegistry | None = None, sast_only: bool = False, ai_client: bool = True, + log_matched_files: bool = False, ) -> tuple[CodeTF | None, int, TokenUsage]: start = datetime.datetime.now() @@ -192,9 +193,12 @@ def run( log_list(logging.INFO, "including paths", context.included_paths) log_list(logging.INFO, "excluding paths", path_exclude) - log_list( - logging.DEBUG, "matched files", (str(path) for path in context.files_to_analyze) - ) + if log_matched_files: + log_list( + logging.DEBUG, + "matched files", + (str(path) for path in context.files_to_analyze), + ) context.semgrep_prefilter_results = find_semgrep_results( context, @@ -279,6 +283,7 @@ def _run_cli(original_args) -> int: original_cli_args=original_args, codemod_registry=codemod_registry, sast_only=argv.sonar_issues_json or argv.sarif, + log_matched_files=True, ) return status