6.2 KiB
Super-linter upgrade guide
This document helps you upgrade from a super-linter version to newer ones:
Upgrade from v6 to v7
This section helps you upgrade from super-linter v6
to v7
.
sql-lint, VALIDATE_SQL and SQL_CONFIG_FILE
sql-lint appears to be unmaintained,
and its dependencies are affected by known security vulnerabilities.
For this reason, Super-linter v7
doesn't include sql-lint anymore. If you
are using sql-lint to check your SQL files, we recommend that you evaluate
sqlfluff, included in Super-linter since v4.6.0
.
You can remove the VALIDATE_SQL
and SQL_CONFIG_FILE
because they have no
effect.
Upgrade from v6.7.0 to v6.8.0
This section helps you upgrade from super-linter v6.7.0
to v6.8.0
.
JAVASCRIPT_DEFAULT_STYLE and TYPESCRIPT_DEFAULT_STYLE
-
The
JAVASCRIPT_DEFAULT_STYLE
andTYPESCRIPT_DEFAULT_STYLE
have been deprecated because they made theVALIDATE_JAVASCRIPT_PRETTIER
,VALIDATE_JAVASCRIPT_STANDARD
,VALIDATE_TYPESCRIPT_PRETTIER
, andVALIDATE_TYPESCRIPT_STANDARD
configuration variables break the documented behavior of howVALIDATE_xxx
variables work. Unfortunately, a transparent configuration update is not feasible without complicating the codebase to address all possible cases. If you only want to run only one between Prettier and Standard, a possible migration strategy could be:-
If you're explicitly enabling linters and formatters that you want Super-linter to run by setting
VALIDATE_xxxx
variables totrue
:- If you set
JAVASCRIPT_DEFAULT_STYLE=standard
, setVALIDATE_JAVASCRIPT_STANDARD=true
- If you set
TYPESCRIPT_DEFAULT_STYLE=standard
, setVALIDATE_TYPESCRIPT_STANDARD=true
- If you set
JAVASCRIPT_DEFAULT_STYLE=prettier
, setVALIDATE_JAVASCRIPT_PRETTIER=true
- If you set
TYPESCRIPT_DEFAULT_STYLE=prettier
, setVALIDATE_TYPESCRIPT_PRETTIER=true
- If you set
-
If you're explicitly disabling linters and formatters that you don't want Super-linter to run by setting
VALIDATE_xxxx
variables tofalse
:- If you set
JAVASCRIPT_DEFAULT_STYLE=standard
, setVALIDATE_JAVASCRIPT_PRETTIER=false
- If you set
TYPESCRIPT_DEFAULT_STYLE=standard
, setVALIDATE_TYPESCRIPT_PRETTIER=false
- If you set
JAVASCRIPT_DEFAULT_STYLE=prettier
, setVALIDATE_JAVASCRIPT_STANDARD=false
- If you set
TYPESCRIPT_DEFAULT_STYLE=prettier
, setVALIDATE_TYPESCRIPT_STANDARD=false
- If you set
Finally, remove both
JAVASCRIPT_DEFAULT_STYLE
andTYPESCRIPT_DEFAULT_STYLE
from your Super-linter configuration. -
Upgrade from v5 to v6
This section helps you upgrade from super-linter v5
to v6
.
eslint-config-airbnb-typescript
- eslint-config-airbnb-typescript (a library to add TypeScript support to Airbnb's ESLint config) appears to be unmaintained. We had to remove it from super-linter because it was blocking updates to other dependencies, such as ESLint.
Checkstyle
- Checkstyle
embeds some configuration files,
such as
sun_checks.xml
andgoogle_checks.xml
. There is no need to provide your own checkstyle configuration files if it matches one of the embedded ones. You can safely remove your Checkstyle configuration file if it matches one of the embedded ones.
Dart
- super-linter doesn't include a default configuration file for
dart analyzer
because the Dart SDK doesn't support runningdart analyzer
against an arbitrary configuration file anymore. For more information about how to customize static analysis of Dart files, see Customizing static analysis in the Dart SDK documentation.
ERROR_ON_MISSING_EXEC_BIT
ERROR_ON_MISSING_EXEC_BIT
has been deprecated to align theVALIDATE_BASH_EXEC
check to the other linters, removing a surprising corner case. IfVALIDATE_BASH_EXEC
is set totrue
and a shell script is not marked as executable, the script will not pass validation. You can remove theERROR_ON_MISSING_EXEC_BIT
variable from your super-linter configuration.
Experimental batch workers
- Experimental batch support is deprecated. You can safely remove the
EXPERIMENTAL_BATCH_WORKER
variable from your configuration.
Gitleaks
- If you defined secret patterns in
.gitleaks.toml
, Gitleaks may report errors about that file. If this happens, you can configure Gitleaks to ignore that file.
Jscpd
- The
VALIDATE_JSCPD_ALL_CODEBASE
variable is deprecated. Jscpd now lints the entire workspace instead of linting files one by one. You can safely remove theVALIDATE_JSCPD_ALL_CODEBASE
variable from your configuration. - Jscpd doesn't consider the
FILTER_REGEX_EXCLUDE
,FILTER_REGEX_INCLUDE
,IGNORE_GENERATED_FILES
variables. For more information about how to ignore files with Jscpd, see the Jscpd documentation.
USE_FIND_ALGORITHM and VALIDATE_ALL_CODEBASE used together
- Setting
USE_FIND_ALGORITHM
totrue
andVALIDATE_ALL_CODEBASE
tofalse
is an unsupported configuration. super-linterv5
and earlier silently ignoredVALIDATE_ALL_CODEBASE
whenUSE_FIND_ALGORITHM
is set totrue
, leading to potentially confusing behavior for users. super-linterv6
explicitly fail in this case. Remove one of the two from your configuration, depending on the desired behavior.
VALIDATE_KOTLIN_ANDROID
- The
VALIDATE_KOTLIN_ANDROID
variable has been deprecated because ktlint handles linting Kotlin files for Android using a configuration option, so super-linter doesn't need to account for this special case anymore. If you setVALIDATE_KOTLIN_ANDROID
in your configuration, change it toVALIDATE_KOTLIN
and configure ktlint to lint Android files.