Skip to content

Commit

Permalink
fix: use file name instead of whole path for language guess (#2734)
Browse files Browse the repository at this point in the history
Namespaces are allowed to contain dots (`.`). Exporting projects with
such namespaces will result in directories for namespaces containing
dots. The current implementation assumes the first dot-separated section
to be language and guesses the language incorrectly.
  • Loading branch information
Anty0 authored Nov 29, 2024
1 parent 7eebb45 commit 961812b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ abstract class ImportFileProcessor {
abstract fun process()

val languageNameGuesses: List<String> by lazy {
val fileName = context.file.name
val filePath = context.file.name

val fileName = filePath.substringAfterLast("/")

val result =
arrayOf(
Expand Down

0 comments on commit 961812b

Please sign in to comment.