Skip to content

Commit 21ffd92

Browse files
asurkovanatolystansler
authored andcommitted
feat: improve existing languages support (#283)
* improve existing languages support * address comments
1 parent 3bebf49 commit 21ffd92

28 files changed

+1339
-304
lines changed

src/main/kotlin/app/extractors/CExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import app.model.DiffFile
99

1010
class CExtractor : ExtractorInterface {
1111
companion object {
12-
const val LANGUAGE_NAME = "c"
12+
const val LANGUAGE_NAME = Lang.C
1313
val evaluator by lazy {
1414
ExtractorInterface.getLibraryClassifier(LANGUAGE_NAME)
1515
}

src/main/kotlin/app/extractors/CSharpExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import app.model.DiffFile
99

1010
class CSharpExtractor : ExtractorInterface {
1111
companion object {
12-
val LANGUAGE_NAME = "csharp"
12+
const val LANGUAGE_NAME = Lang.CSharp
1313
val LIBRARIES = ExtractorInterface.getLibraries("cs")
1414
val evaluator by lazy {
1515
ExtractorInterface.getLibraryClassifier(LANGUAGE_NAME)

src/main/kotlin/app/extractors/CppExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import app.model.DiffFile
99

1010
class CppExtractor : ExtractorInterface {
1111
companion object {
12-
val LANGUAGE_NAME = "cpp"
12+
const val LANGUAGE_NAME = Lang.CPlusPlus
1313
val evaluator by lazy {
1414
ExtractorInterface.getLibraryClassifier(LANGUAGE_NAME)
1515
}

src/main/kotlin/app/extractors/CssExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import app.model.DiffFile
88

99
class CssExtractor : ExtractorInterface {
1010
companion object {
11-
val LANGUAGE_NAME = "css"
11+
const val LANGUAGE_NAME = Lang.CSS
1212
val FILE_EXTS = listOf("css", "scss", "less", "sass")
1313
}
1414

src/main/kotlin/app/extractors/FSharpExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import app.model.DiffFile
99

1010
class FSharpExtractor : ExtractorInterface {
1111
companion object {
12-
val LANGUAGE_NAME = "fsharp"
12+
const val LANGUAGE_NAME = Lang.FSharp
1313
// The behaviour of csharp library classifier is the same as for csharp.
1414
val LIBRARIES = ExtractorInterface.getLibraries("cs")
1515
val evaluator by lazy {

src/main/kotlin/app/extractors/GoExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import app.model.DiffFile
99

1010
class GoExtractor : ExtractorInterface {
1111
companion object {
12-
val LANGUAGE_NAME = "go"
12+
const val LANGUAGE_NAME = Lang.Go
1313
val evaluator by lazy {
1414
ExtractorInterface.getLibraryClassifier(LANGUAGE_NAME)
1515
}

0 commit comments

Comments
 (0)