Skip to content

Commit

Permalink
Small fix to log report when running codemods
Browse files Browse the repository at this point in the history
  • Loading branch information
drdavella committed Dec 11, 2023
1 parent 44bccc1 commit 7b16529
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codemodder/codemodder.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ def apply_codemods(

# run codemods one at a time making sure to respect the given sequence
for codemod in codemods_to_run:
# NOTE: this may be used as a progress indicator by upstream tools
logger.info("running codemod %s", codemod.id)

# Unfortunately the IDs from semgrep are not fully specified
# TODO: eventually we need to be able to use fully specified IDs here
if codemod.is_semgrep and codemod.name not in semgrep_finding_ids:
Expand All @@ -211,7 +214,6 @@ def apply_codemods(
)
continue

logger.info("running codemod %s", codemod.id)
semgrep_files = semgrep_results.files_for_rule(codemod.name)
# Non-semgrep codemods ignore the semgrep results
results = codemod.apply(context, semgrep_files)
Expand Down

0 comments on commit 7b16529

Please sign in to comment.