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:
Alexandre Favre 2022-03-24 21:39:52 +01:00 committed by GitHub
parent aee503c133
commit edc7095b4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 0 deletions

View 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)
}

View 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)
}

View file

@ -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. |

View file

@ -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 #

View file

@ -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