From 2df33ca96d51e1825a7408fb142da38164ec5a9d Mon Sep 17 00:00:00 2001 From: Knut Wannheden Date: Fri, 30 Aug 2024 09:31:28 +0200 Subject: [PATCH] Don't show `PlainText` `.py` sources as `Python` --- .../java/org/openrewrite/LanguageComposition.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/main/java/org/openrewrite/LanguageComposition.java b/src/main/java/org/openrewrite/LanguageComposition.java index 058ef72..be2a9cc 100644 --- a/src/main/java/org/openrewrite/LanguageComposition.java +++ b/src/main/java/org/openrewrite/LanguageComposition.java @@ -293,18 +293,6 @@ public TreeVisitor 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<>())