Skip to content

Commit

Permalink
Don't show PlainText .py sources as Python
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Aug 30, 2024
1 parent d7adacd commit 2df33ca
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/main/java/org/openrewrite/LanguageComposition.java
Original file line number Diff line number Diff line change
Expand Up @@ -293,18 +293,6 @@ public TreeVisitor<?, ExecutionContext> getScanner(Accumulator acc) {
s.getClass().getName(),
genericLineCount,
hasParseFailure));
} else if (s.getSourcePath().endsWith(".py")) {
Counts pythonCounts = acc.getFolderToLanguageToCounts()
.computeIfAbsent(folderPath, k -> new HashMap<>())
.computeIfAbsent("Python", k -> new Counts());
pythonCounts.fileCount++;
pythonCounts.lineCount += genericLineCount;
perFileReport.insertRow(ctx, new LanguageCompositionPerFile.Row(
s.getSourcePath().toString(),
"Python",
s.getClass().getName(),
genericLineCount,
hasParseFailure));
} else {
Counts plainTextCounts = acc.getFolderToLanguageToCounts()
.computeIfAbsent(folderPath, k -> new HashMap<>())
Expand Down

0 comments on commit 2df33ca

Please sign in to comment.