Skip to content

Commit 785ead7

Browse files
authored
Skip SensitiveDataLoggingCodemod when LLM not available (#419)
This codemod does not inherit from the base class with the existing check so it did not benefit from the work in #418.
1 parent 02b25a8 commit 785ead7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core-codemods/src/main/java/io/codemodder/codemods/SensitiveDataLoggingCodemod.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ private static Optional<Statement> getSingleStatement(
119119

120120
@Override
121121
public boolean shouldRun() {
122+
if (!service.isServiceAvailable()) {
123+
return false;
124+
}
122125
List<Run> runs = sarif.rawDocument().getRuns();
123126
return runs != null && !runs.isEmpty() && !runs.get(0).getResults().isEmpty();
124127
}

0 commit comments

Comments
 (0)