{{ message }}
Repository navigation
console: map PYTHONSRC to the ImportCode member named python - #6243
Merged
max-leuthaeuser merged 2 commits intoSep 7, 2026
Merged
Conversation
languageFromConfig already carries a table for the case where a Languages value and its ImportCode member name differ -- JAVASRC is special-cased to "java" because ImportCode exposes it as `def java`. PYTHONSRC was missed, so it falls through to lang.toLowerCase and the generated script says `importCode.pythonsrc`, which is not a member. Every Python repository fails to scan. Checked the other members against their Languages values (kotlin, golang, csharpsrc, php, abap): Python was the only remaining gap.
max-leuthaeuser
marked this pull request as ready for review
September 6, 2026 14:42
max-leuthaeuser
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

languageFromConfigalready carries a table for the case where aLanguagesvalue and itsImportCodemember name differ —JAVASRCis special-cased to"java"becauseImportCodeexposes it asdef java.PYTHONSRCwas missed, so it falls through tolang.toLowerCaseand the generated script saysimportCode.pythonsrc.The compiler names the fix itself:
This is the default path, not an opt-in
cpgcreation/package.scalareturnsSome(Languages.PYTHONSRC)for any file ending.py, andImportCode.scalabinds that same value to the memberpython. So auto-detection — whatjoern-scan <dir>does with no--language— produces the one spelling that does not compile. Every Python repository fails to scan.Reproducer
Measured against joern 4.0.610 (Homebrew, macOS arm64, JDK 25):
On a stock launcher that failure arrives as exit 0 with the log banner as the only output, so a caller reads it as a clean scan of a repository with no findings. That amplifier is #6237; this is one of the faults it was hiding.
I checked the other members against their
Languagesvalues while I was in there — kotlin, golang, csharpsrc, php, abap all agree. Python was the only remaining gap.Not measured
There is no sbt on this machine, so I have not compiled this. The one-line change follows the
JAVASRCline directly above it, and the failure it fixes is measured on the released distribution, but the after state is an expectation rather than something I watched.scalafmt --testpasses with the repo's pinned 3.8.1 — the formatting is scalafmt's own output, not hand-matched.Closes: #5708