Skip to content

Commit

Permalink
add debug statement when no files match (#851)
Browse files Browse the repository at this point in the history
* add debug statement when no files match

* Hardening suggestions for codemodder-python / debug-file (#852)

Use Assignment Expression (Walrus) In Conditional

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
  • Loading branch information
clavedeluna and pixeebot[bot] authored Sep 24, 2024
1 parent 6367bda commit 90216b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codemodder/codemods/base_codemod.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ def _apply(
logger.debug("No results for %s", self.id)
return

files_to_analyze = self.get_files_to_analyze(context, results)
if not (files_to_analyze := self.get_files_to_analyze(context, results)):
logger.debug("No files matched for %s", self.id)
return

process_file = functools.partial(
self._process_file, context=context, results=results, rules=rules
Expand Down

0 comments on commit 90216b3

Please sign in to comment.