From 20d12b4c7aba7c1bda7a19becd5ee4e7429d8235 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Dec 2023 19:33:08 +0100 Subject: [PATCH] deps(java): bump com.pinterest.ktlint:ktlint-cli in /dependencies/ktlint (#5050) Remove KOTLIN_ANDROID because ktlint handles that case by reading a configuration setting in .editorconfig. Bumps [com.pinterest.ktlint:ktlint-cli](https://github.com/pinterest/ktlint) from 0.47.1 to 1.1.0. - [Release notes](https://github.com/pinterest/ktlint/releases) - [Changelog](https://github.com/pinterest/ktlint/blob/master/CHANGELOG.md) - [Commits](https://github.com/pinterest/ktlint/compare/0.47.1...1.1.0) --- updated-dependencies: - dependency-name: com.pinterest.ktlint:ktlint-cli dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- README.md | 1 - dependencies/ktlint/build.gradle | 2 +- docs/upgrade-guide.md | 5 +++++ lib/functions/buildFileList.sh | 1 - lib/functions/validation.sh | 1 + lib/linter.sh | 4 +--- test/linters/kotlin/kotlin_good_1.kt | 3 ++- test/linters/kotlin_android/kotlin_android_bad_1.kt | 9 --------- test/linters/kotlin_android/kotlin_android_good_1.kt | 10 ---------- 9 files changed, 10 insertions(+), 26 deletions(-) delete mode 100644 test/linters/kotlin_android/kotlin_android_bad_1.kt delete mode 100644 test/linters/kotlin_android/kotlin_android_good_1.kt diff --git a/README.md b/README.md index d0d0dd85..742da0a3 100644 --- a/README.md +++ b/README.md @@ -250,7 +250,6 @@ You can configure super-linter using the following environment variables: | **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_KUBECONFORM** | `true` | Flag to enable or disable the linting process of Kubernetes descriptors with Kubeconform | | **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. | diff --git a/dependencies/ktlint/build.gradle b/dependencies/ktlint/build.gradle index 8718b818..b7e9a8ad 100644 --- a/dependencies/ktlint/build.gradle +++ b/dependencies/ktlint/build.gradle @@ -5,7 +5,7 @@ repositories { // Hold this dependency here so we can get automated updates using DependaBot dependencies { - implementation 'com.pinterest.ktlint:ktlint-cli:0.47.1' + implementation 'com.pinterest.ktlint:ktlint-cli:1.1.0' } group 'com.github.super-linter' diff --git a/docs/upgrade-guide.md b/docs/upgrade-guide.md index a865867b..a2f76215 100644 --- a/docs/upgrade-guide.md +++ b/docs/upgrade-guide.md @@ -39,3 +39,8 @@ This section helps you migrate from super-linter `v5` to `v6`. `IGNORE_GENERATED_FILES`, `IGNORE_GITIGNORED_FILES` variables. For more information about how to ignore files with textlint, see [the textlint documentation](https://textlint.github.io/docs/ignore.html). + +### VALIDATE_KOTLIN_ANDROID + +- The `VALIDATE_KOTLIN_ANDROID` variable has been deprecated. If you set it in + your configuration, change it to `VALIDATE_KOTLIN`. diff --git a/lib/functions/buildFileList.sh b/lib/functions/buildFileList.sh index 6ec8d4dc..e1c50453 100755 --- a/lib/functions/buildFileList.sh +++ b/lib/functions/buildFileList.sh @@ -546,7 +546,6 @@ function BuildFileList() { # Append the file to the array # ################################ FILE_ARRAY_KOTLIN+=("${FILE}") - FILE_ARRAY_KOTLIN_ANDROID+=("${FILE}") ##################### # Get the LUA files # diff --git a/lib/functions/validation.sh b/lib/functions/validation.sh index c447f685..07875729 100755 --- a/lib/functions/validation.sh +++ b/lib/functions/validation.sh @@ -282,4 +282,5 @@ function WarnIfVariableIsSet() { function ValidateDeprecatedVariables() { WarnIfVariableIsSet "${EXPERIMENTAL_BATCH_WORKER}" "EXPERIMENTAL_BATCH_WORKER" WarnIfVariableIsSet "${VALIDATE_JSCPD_ALL_CODEBASE}" "VALIDATE_JSCPD_ALL_CODEBASE" + WarnIfVariableIsSet "${VALIDATE_KOTLIN_ANDROID}" "VALIDATE_KOTLIN_ANDROID" } diff --git a/lib/linter.sh b/lib/linter.sh index 588198a1..4c7e8d2c 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -294,7 +294,7 @@ LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'BASH_EXEC' 'CHECKOV' 'CLANG_FORMAT' 'DOCKERFILE_HADOLINT' 'EDITORCONFIG' 'ENV' 'GITHUB_ACTIONS' 'GITLEAKS' 'GHERKIN' 'GO' 'GO_MODULES' 'GOOGLE_JAVA_FORMAT' 'GROOVY' 'HTML' 'JAVA' 'JAVASCRIPT_ES' "${JAVASCRIPT_STYLE_NAME}" 'JSCPD' 'JSON' 'JSONC' 'JSX' - 'KUBERNETES_KUBECONFORM' 'KOTLIN' 'KOTLIN_ANDROID' 'LATEX' 'LUA' 'MARKDOWN' + 'KUBERNETES_KUBECONFORM' 'KOTLIN' 'LATEX' 'LUA' 'MARKDOWN' 'NATURAL_LANGUAGE' 'OPENAPI' 'PERL' 'PHP_BUILTIN' 'PHP_PHPCS' 'PHP_PHPSTAN' 'PHP_PSALM' 'POWERSHELL' 'PROTOBUF' 'PYTHON_BLACK' 'PYTHON_PYLINT' 'PYTHON_FLAKE8' 'PYTHON_ISORT' 'PYTHON_MYPY' 'R' 'RAKU' 'RENOVATE' 'RUBY' 'RUST_2015' @@ -339,7 +339,6 @@ 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_KUBECONFORM']="kubeconform" LINTER_NAMES_ARRAY['LATEX']="chktex" LINTER_NAMES_ARRAY['LUA']="lua" @@ -973,7 +972,6 @@ 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_KUBECONFORM_OPTIONS}" == "null" ] || [ -z "${KUBERNETES_KUBECONFORM_OPTIONS}" ]; then LINTER_COMMANDS_ARRAY['KUBERNETES_KUBECONFORM']="kubeconform -strict" else diff --git a/test/linters/kotlin/kotlin_good_1.kt b/test/linters/kotlin/kotlin_good_1.kt index 0f4f67ae..ea53617e 100644 --- a/test/linters/kotlin/kotlin_good_1.kt +++ b/test/linters/kotlin/kotlin_good_1.kt @@ -1,4 +1,5 @@ -// ktlint-disable filename +@file:Suppress("ktlint:standard:filename") + fun main() { val n = "World" val v = "Hello, $n!" diff --git a/test/linters/kotlin_android/kotlin_android_bad_1.kt b/test/linters/kotlin_android/kotlin_android_bad_1.kt deleted file mode 100644 index 87014265..00000000 --- a/test/linters/kotlin_android/kotlin_android_bad_1.kt +++ /dev/null @@ -1,9 +0,0 @@ -import pkg.PkgClass -import java.JavaClass - -fun main(str1: String, str2: String, str3: String) { - val j = JavaClass() - val p = PkgClass() - - println(p) -} diff --git a/test/linters/kotlin_android/kotlin_android_good_1.kt b/test/linters/kotlin_android/kotlin_android_good_1.kt deleted file mode 100644 index 672221e5..00000000 --- a/test/linters/kotlin_android/kotlin_android_good_1.kt +++ /dev/null @@ -1,10 +0,0 @@ -// ktlint-disable filename -import pkg.PkgClass -import java.JavaClass - -fun main(str1: String, str2: String, str3: String) { - val j = JavaClass() - val p = PkgClass() - - println(p) -}