mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-21 21:50:59 -05:00
Add Android support for Kotlin (#2670)
* Fix Kotlin good test case (incorrect filename) * Add Android support for Kotlin Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
This commit is contained in:
parent
aee503c133
commit
edc7095b4b
6 changed files with 22 additions and 0 deletions
9
.automation/test/kotlin_android/kotlin_android_bad_1.kt
Normal file
9
.automation/test/kotlin_android/kotlin_android_bad_1.kt
Normal file
|
@ -0,0 +1,9 @@
|
|||
import pkg.PkgClass
|
||||
import java.JavaClass
|
||||
|
||||
fun main(str1: String, str2: String, str3: String) {
|
||||
val j = JavaClass()
|
||||
val p = PkgClass()
|
||||
|
||||
println(p)
|
||||
}
|
9
.automation/test/kotlin_android/kotlin_android_good_1.kt
Normal file
9
.automation/test/kotlin_android/kotlin_android_good_1.kt
Normal file
|
@ -0,0 +1,9 @@
|
|||
import java.JavaClass
|
||||
import pkg.PkgClass
|
||||
|
||||
fun main(str1: String, str2: String, str3: String) {
|
||||
val j = JavaClass()
|
||||
val p = PkgClass()
|
||||
|
||||
println(p)
|
||||
}
|
|
@ -365,6 +365,7 @@ But if you wish to select or exclude specific linters, we give you full control
|
|||
| **VALIDATE_JSON** | `true` | Flag to enable or disable the linting process of the JSON language. |
|
||||
| **VALIDATE_JSX** | `true` | Flag to enable or disable the linting process for jsx files (Utilizing: eslint) |
|
||||
| **VALIDATE_KOTLIN** | `true` | Flag to enable or disable the linting process of the Kotlin language. |
|
||||
| **VALIDATE_KOTLIN_ANDROID** | `true` | Flag to enable or disable the linting process of the Kotlin language. (Utilizing: `ktlint --android`) |
|
||||
| **VALIDATE_KUBERNETES_KUBEVAL** | `true` | Flag to enable or disable the linting process of Kubernetes descriptors with Kubeval |
|
||||
| **VALIDATE_LATEX** | `true` | Flag to enable or disable the linting process of the LaTeX language. |
|
||||
| **VALIDATE_LUA** | `true` | Flag to enable or disable the linting process of the language. |
|
||||
|
|
|
@ -562,6 +562,7 @@ function BuildFileList() {
|
|||
# Append the file to the array #
|
||||
################################
|
||||
FILE_ARRAY_KOTLIN+=("${FILE}")
|
||||
FILE_ARRAY_KOTLIN_ANDROID+=("${FILE}")
|
||||
|
||||
#####################
|
||||
# Get the LUA files #
|
||||
|
|
|
@ -290,6 +290,7 @@ LINTER_NAMES_ARRAY['JSON']="eslint"
|
|||
LINTER_NAMES_ARRAY['JSONC']="eslint"
|
||||
LINTER_NAMES_ARRAY['JSX']="eslint"
|
||||
LINTER_NAMES_ARRAY['KOTLIN']="ktlint"
|
||||
LINTER_NAMES_ARRAY['KOTLIN_ANDROID']="ktlint"
|
||||
LINTER_NAMES_ARRAY['KUBERNETES_KUBEVAL']="kubeval"
|
||||
LINTER_NAMES_ARRAY['LATEX']="chktex"
|
||||
LINTER_NAMES_ARRAY['LUA']="lua"
|
||||
|
@ -908,6 +909,7 @@ LINTER_COMMANDS_ARRAY['JSON']="eslint --no-eslintrc -c ${JAVASCRIPT_ES_LINTER_RU
|
|||
LINTER_COMMANDS_ARRAY['JSONC']="eslint --no-eslintrc -c ${JAVASCRIPT_ES_LINTER_RULES} --ext .json5,.jsonc"
|
||||
LINTER_COMMANDS_ARRAY['JSX']="eslint --no-eslintrc -c ${JSX_LINTER_RULES}"
|
||||
LINTER_COMMANDS_ARRAY['KOTLIN']="ktlint"
|
||||
LINTER_COMMANDS_ARRAY['KOTLIN_ANDROID']="ktlint --android"
|
||||
if [ "${KUBERNETES_KUBEVAL_OPTIONS}" == "null" ] || [ -z "${KUBERNETES_KUBEVAL_OPTIONS}" ]; then
|
||||
LINTER_COMMANDS_ARRAY['KUBERNETES_KUBEVAL']="kubeval --strict"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue