Skip to content

Super-Linter

Actions
Super-linter is a ready-to-run collection of linters and code analyzers, to help validate your source code
v8.3.0
Latest
Verified creator
Star (10.2K)

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Super-Linter

Super-linter is a ready-to-run collection of linters and code analyzers, to help validate and fix your source code.

The goal of super-linter is to help you establish best practices and consistent formatting across multiple programming languages, and ensure developers are adhering to those conventions.

Super-linter analyzes source code files using several tools, and reports the issues that those tools find as console output, and as GitHub Actions status checks. You can also run super-linter outside GitHub Actions.

Super-linter can also help you fix linting and formatting issues.

Super-linter is licensed under an MIT License.

Super-Linter

Here are some notable Super-linter features:

  • MIT License: Super-linter is licensed under a MIT License.
  • Independent project: Super-linter is maintained by a team of independent developers and is not commercially backed by any entity that might influence the course of the project.
  • Widely used: Super-linter is the most widely used and forked project of this kind.
  • Runs linters in parallel: Since v6, Super-linter parallelizes running all the included linters, leading to scanning massive code repositories in seconds.
  • Highly curated set of linters: Avoid including linters that implement overlapping checks, reducing bloat, scanning times, and container image size.
  • Run on GitHub Actions or other environments: Super-linter runs on GitHub Actions and other runtime environments, with the only dependency of an OCI-compatible container runtime engine, such as Docker.
  • Lean codebase: Super-linter doesn't reinvent the wheel, and builds on top of established tools and standards, such as GNU Parallel.
  • Extensive test suite: Super-linter includes an extensive test suite that covers every single linter and analyzer that Super-linter ships.
  • Original design: to the best of our knowledge, Super-linter is the first open-source, fully-containerized linting suite. Other projects borrow ideas and design choices from Super-linter (and we're cool with that :).

How to contribute

If you would like to help contribute to Super-linter, see CONTRIBUTING.

For a guide on how to set up your development environment and contribute to Super-linter, see the development guide.

Supported linters and formatters

Super-linter supports the following tools:

LanguageLintersFormatters
Ansibleansible-lintSee YAML and Python formatters
Amazon States LanguageASL ValidatorSee JSON formatters
AstroBiomeBiome
AWS CloudFormation templatesAWS CloudFormation Linter (cfn-lint), Checkov, TrivySee YAML formatters
Azure Resource Manager (ARM)Azure Resource Manager Template Toolkit (arm-ttk), Checkov, TrivySee JSON formatters
C, C++cpp-lintclang-format
C#See Dotnet solutionsdotnet format whitespace command
CSS, SCSS, Sassstylelint, BiomePrettier, Biome
Clojureclj-kondo
CoffeeScriptcoffeelint
Commit messagescommitlint
Copy/paste detectionjscpdN/A
Dartdart analyze command
DockerfileHaskell Dockerfile Linter (Hadolint), Checkov, Trivy
Dotnet (.NET) solutions (sln)dotnet format command: analyzers, style subcommands.dotnet format command: whitespace subcommand.
EditorConfigeditorconfig-checker
.envdotenv-linter
Git merge conflict markersGit conflict markers presence in filesN/A
GitHub Actionsactionlint, zizmorSee YAML formatters
Gogolangci-lint
GoReleaserGoReleaserSee YAML formatters
GraphQLBiomePrettier, Biome
GritQLBiome
Groovynpm-groovy-lint
Helm chartsCheckovSee YAML formatters
HTMLHTMLHintPrettier, Biome
Javacheckstylegoogle-java-format
JavaScriptESLint, BiomePrettier, Biome
JSONeslint-plugin-jsonc (configured for JSON) (ESLint default), eslint-plugin-json, BiomePrettier, Biome
JSONC, JSON5eslint-plugin-jsonc, BiomePrettier, Biome
JSX, TSXeslint-plugin-jsx-a11y, eslint-plugin-react, BiomePrettier, Biome
Jupyter Notebooknbqanbqa
KubernetesCheckov, Trivy, kubeconformSee YAML formatters
Kotlinktlint
LaTeXChkTex
LicensesTrivyN/A
Lualuacheck
MarkdownmarkdownlintPrettier
Natural languagetextlintN/A
OpenAPIspectralSee YAML formatters
Perlperlcritic
PHPPHP built-in linter, PHP CodeSniffer, PHPStan, Psalm
PowerShellPSScriptAnalyzer
Pre-commitpre-commit
Protocol Buffers (Protobuf)protolint
Python3pylint, flake8, isort, ruffblack
Rlintr
Renovaterenovate-config-validatorSee JSON formatters
RubyRuboCop
RustClippyRustfmt
Scalascalafmt
Software bill of materials (SBOM)TrivyN/A
SecretsGitLeaks, TrivyN/A
ShellShellCheck, executable bit checkshfmt
Snakemakesnakemake --lintsnakefmt
SQLsqlfluff
SvelteBiomeBiome
Terraformtflint , terrascan, Checkov, Trivyterraform fmt
TerragruntterragruntN/A
TypeScriptESLint, BiomePrettier, Biome
Vueeslint-plugin-vue, BiomePrettier, Biome
VulnerabilitiesTrivyN/A
XMLLibXML
YAMLYamlLintPrettier

Get started

More in-depth tutorial available

To run super-linter as a GitHub Action, you do the following:

  1. Create a new GitHub Actions workflow in your repository with the following content:

    --- name: Linton: # yamllint disable-line rule:truthypush: nullpull_request: nullpermissions: {}jobs: build: name: Lintruns-on: ubuntu-latestpermissions: contents: readpackages: read# To report GitHub Actions status checksstatuses: writesteps: - name: Checkout codeuses: actions/checkout@v5with: # super-linter needs the full git history to get the# list of files that changed across commitsfetch-depth: 0persist-credentials: false - name: Super-linteruses: super-linter/[email protected]# x-release-please-versionenv: # To report GitHub Actions status checksGITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
  2. Commit that file to a new branch.

  3. Push the new commit to the remote repository.

  4. Create a new pull request to observe the results.

Upgrade to newer super-linter versions

For more information about upgrading super-linter to a new major version, see the upgrade guide.

Add Super-Linter badge in your repository readme

You can show Super-Linter status with a badge in your repository readme:

Example:

[![Super-Linter](https://github.com/<OWNER>/<REPOSITORY>/actions/workflows/<WORKFLOW_FILE_NAME>/badge.svg)](https://github.com/marketplace/actions/super-linter)

For more information, see Adding a workflow status badge.

Super-linter variants

Super-Linter provides several variants:

  • standard: super-linter/super-linter@[VERSION]: includes all supported linters.
  • slim: super-linter/super-linter/slim@[VERSION]: includes all supported linters except:
    • Rustfmt
    • Rust Clippy
    • Azure Resource Manager Template Toolkit (arm-ttk)
    • PSScriptAnalyzer
    • dotnet (.NET) commands and subcommands

Configure Super-linter

You can configure Super-linter using the following environment variables:

Environment variableDefault ValueDescription
ANSIBLE_CONFIG_FILE.ansible-lint.ymlFilename for Ansible-lint configuration (ex: .ansible-lint, .ansible-lint.yml)
ANSIBLE_DIRECTORY/ansibleFlag to set the root directory for Ansible file location(s), relative to DEFAULT_WORKSPACE. Set to . to use the top-level of the DEFAULT_WORKSPACE.
BASH_EXEC_IGNORE_LIBRARIESfalseIf set to true, shell files with a file extension and no shebang line are ignored when checking if the executable bit is set.
BASH_FILE_NAME.shellcheckrcFilename for Shellcheck
BASH_SEVERITYShellcheck default severitySpecify the minimum severity of errors to consider in shellcheck. Valid values in order of severity are error, warning, info and style.
CHECKOV_FILE_NAME.checkov.yamlConfiguration filename for Checkov.
CLANG_FORMAT_FILE_NAME.clang-formatConfiguration filename for clang-format.
CREATE_LOG_FILEfalseIf set to true, it creates the log file. You can set the log filename using the LOG_FILE environment variable. This overrides any existing log files.
CSS_FILE_NAME.stylelintrc.jsonFilename for Stylelint configuration (ex: .stylelintrc.yml, .stylelintrc.yaml)
DEFAULT_BRANCHDefault repository branch when running on GitHub Actions, master otherwiseThe name of the repository default branch. Don't set this variable when running on GitHub Actions, unless you want to compare changes against a branch that's not the GitHub repository default branch.
DEFAULT_WORKSPACE/tmp/lintThe location containing files to lint if you are running locally. Defaults to GITHUB_WORKSPACE when running in GitHub Actions. There's no need to configure this variable when running on GitHub Actions.
DISABLE_ERRORSfalseFlag to have the linter complete with exit code 0 even if errors were detected.
DOCKERFILE_HADOLINT_FILE_NAME.hadolint.yamlFilename for hadolint configuration (ex: .hadolintlintrc.yaml)
EDITORCONFIG_FILE_NAME.editorconfig-checker.jsonFilename for editorconfig-checker configuration
ENABLE_COMMITLINT_EDIT_MODEfalseIf set to true checks the commit message that is currently being edited with Commitlint. This is useful to run Super-linter in a commit-msg hook.
ENABLE_COMMITLINT_STRICT_MODEfalseIf set to true, enables commitlint strict mode.
ENABLE_GITHUB_ACTIONS_GROUP_TITLEfalse if RUN_LOCAL=true, true otherwiseFlag to enable GitHub Actions log grouping.
ENABLE_GITHUB_ACTIONS_STEP_SUMMARYfalse if RUN_LOCAL=true, true otherwiseFlag to enable GitHub Actions job summary for the Super-linter action. For more information, see Summary outputs.
ENFORCE_COMMITLINT_CONFIGURATION_CHECKfalseIf set to true and VALIDATE_GIT_COMMITLINT is set to true, Super-linter exits with an error if there's no commitlint configuration file. Otherwise, Super-linter emits a warning and forcefully sets VALIDATE_GIT_COMMITLINT to false.
EXPORT_GITHUB_TOKENfalseIf set to true, exports the GITHUB_TOKEN variable so that subprocesses can access it. It's useful when linters and formatters need to authenticate, and support loading credentials from GITHUB_TOKEN.
FAIL_ON_CONFLICTING_TOOLS_ENABLEDfalseIf set to true, Super-linter will exit with an error if potentially conflicting linters or formatters are enabled.
FAIL_ON_INVALID_GITHUB_ACTIONS_EVENT_CONFIGURATIONfalseIf set to true, Super-linter will exit with an error if the Super-linter configuration is not valid for specific GitHub Actions events.
FILTER_REGEX_EXCLUDEnot setRegular expression defining which files will be excluded from linting (ex: .*src/test.*). Not setting this variable means to process all files.
FILTER_REGEX_INCLUDEnot setRegular expression defining which files will be processed by linters (ex: .*src/.*). Not setting this variable means to process all files. FILTER_REGEX_INCLUDE is evaluated before FILTER_REGEX_EXCLUDE.
FIX_ANSIBLEfalseOption to enable fix mode for ANSIBLE.
FIX_BIOME_FORMATfalseOption to enable fix mode for BIOME_FORMAT
FIX_BIOME_LINTfalseOption to enable fix mode for BIOME_LINT
FIX_CLANG_FORMATfalseOption to enable fix mode for CLANG_FORMAT.
FIX_CSHARPfalseOption to enable fix mode for CSHARP.
FIX_CSS_PRETTIERfalseFlag to enable or disable the formatting of CSS, Sass, and SCSS files with Prettier.
FIX_CSSfalseOption to enable fix mode for CSS.
FIX_DOTNET_SLN_FORMAT_ANALYZERSfalseOption to enable or disable fix mode for Dotnet solutions.
FIX_DOTNET_SLN_FORMAT_STYLEfalseOption to enable or disable fix mode for Dotnet solutions.
FIX_DOTNET_SLN_FORMAT_WHITESPACEfalseOption to enable or disable fix mode for Dotnet solutions.
FIX_ENVfalseOption to enable fix mode for ENV.
FIX_GITHUB_ACTIONS_ZIZMORfalseOption to enable fix mode for GITHUB_ACTIONS_ZIZMOR.
FIX_GO_MODULESfalseOption to enable fix mode for GO_MODULES.
FIX_GOfalseOption to enable fix mode for GO.
FIX_GOOGLE_JAVA_FORMATfalseOption to enable fix mode for GOOGLE_JAVA_FORMAT.
FIX_GRAPHQL_PRETTIERfalseFlag to enable or disable the formatting of GraphQL files with Prettier.
FIX_GROOVYfalseOption to enable fix mode for GROOVY.
FIX_HTML_PRETTIERfalseFlag to enable or disable the formatting of HTML files with Prettier.
FIX_JAVASCRIPT_ESfalseOption to enable fix mode for JAVASCRIPT_ES.
FIX_JAVASCRIPT_PRETTIERfalseFlag to enable or disable the formatting of JavaScript files with Prettier.
FIX_JSON_PRETTIERfalseFlag to enable or disable the formatting of JSON files with Prettier.
FIX_JSONfalseOption to enable fix mode for JSON.
FIX_JSONCfalseOption to enable fix mode for JSONC.
FIX_JSONC_PRETTIERfalseOption to enable fix mode for JSONC and JSON5 files with Prettier.
FIX_JSX_PRETTIERfalseOption to enable fix mode for JSX files with Prettier.
FIX_JSXfalseOption to enable fix mode for JSX.
FIX_JUPYTER_NBQA_BLACKfalseOption to enable fix mode for NBQA_BLACK.
FIX_JUPYTER_NBQA_ISORTfalseOption to enable fix mode for NBQA_ISORT.
FIX_JUPYTER_NBQA_RUFFfalseOption to enable fix mode for NBQA_RUFF.
FIX_KOTLINfalseOption to enable fix mode for KOTLIN.
FIX_MARKDOWN_PRETTIERfalseOption to enable fix mode for Markdown files with Prettier.
FIX_MARKDOWNfalseOption to enable fix mode for MARKDOWN.
FIX_NATURAL_LANGUAGEfalseOption to enable fix mode for NATURAL_LANGUAGE.
FIX_POWERSHELLfalseOption to enable fix mode for POWERSHELL.
FIX_PROTOBUFfalseOption to enable fix mode for PROTOBUF.
FIX_PYTHON_BLACKfalseOption to enable fix mode for PYTHON_BLACK.
FIX_PYTHON_ISORTfalseOption to enable fix mode for PYTHON_ISORT.
FIX_PYTHON_RUFFfalseOption to enable fix mode for PYTHON_RUFF.
FIX_PYTHON_RUFF_FORMATfalseOption to enable fix mode for PYTHON_RUFF_FORMAT.
FIX_RUBYfalseOption to enable fix mode for RUBY.
FIX_RUST_2015falseOption to enable fix mode for RUST_2015.
FIX_RUST_2018falseOption to enable fix mode for RUST_2018.
FIX_RUST_2021falseOption to enable fix mode for RUST_2021.
FIX_RUST_2024falseOption to enable fix mode for RUST_2024.
FIX_RUST_CLIPPYfalseOption to enable fix mode for RUST_CLIPPY. When FIX_RUST_CLIPPY is true, Clippy is allowed to fix issues in the workspace even if there are unstaged and staged changes in the workspace.
FIX_SCALAFMTfalseOption to enable fix mode for SCALAFMT.
FIX_SHELL_SHFMTfalseOption to enable fix mode for SHELL_SHFMT.
FIX_SNAKEMAKE_SNAKEFMTfalseOption to enable fix mode for SNAKEMAKE_SNAKEFMT.
FIX_SQLFLUFFfalseOption to enable fix mode for SQLFLUFF.
FIX_TERRAFORM_FMTfalseOption to enable fix mode for TERRAFORM_FMT.
FIX_TSXfalseOption to enable fix mode for TSX.
FIX_TYPESCRIPT_ESfalseOption to enable fix mode for TYPESCRIPT_ES.
FIX_TYPESCRIPT_PRETTIERfalseFlag to enable or disable the formatting of TypeScript files with Prettier.
FIX_VUEfalseOption to enable fix mode for VUE.
FIX_VUE_PRETTIERfalseFlag to enable or disable the formatting of Vue files with Prettier.
FIX_YAML_PRETTIERfalseFlag to enable or disable the formatting of YAML files with Prettier.
GITHUB_ACTIONS_CONFIG_FILEactionlint.ymlFilename for Actionlint configuration (ex: actionlint.yml)
GITHUB_ACTIONS_COMMAND_ARGSnullAdditional arguments passed to actionlint command. Useful to ignore some errors
GITHUB_ACTIONS_ZIZMOR_CONFIG_FILEzizmor.yamlFilename for zizmor configuration file
GITHUB_CUSTOM_API_URLhttps://api.${GITHUB_DOMAIN}Specify a custom GitHub API URL in case GitHub Enterprise is used: e.g. https://github.myenterprise.com/api/v3
GITHUB_CUSTOM_SERVER_URLhttps://${GITHUB_DOMAIN}"Specify a custom GitHub server URL. Useful for GitHub Enterprise instances.
GITHUB_DOMAINgithub.comSpecify a custom GitHub domain in case GitHub Enterprise is used: e.g. github.myenterprise.com. GITHUB_DOMAIN is a convenience configuration variable to automatically build GITHUB_CUSTOM_API_URL and GITHUB_CUSTOM_SERVER_URL.
GITLEAKS_COMMAND_OPTIONSnot setAdditional options and arguments to pass to the command when running Gitleaks
GITLEAKS_CONFIG_FILE.gitleaks.tomlFilename for GitLeaks configuration (ex: .gitleaks.toml)
GITLEAKS_LOG_LEVELGitleaks default log levelGitleaks log level. Defaults to the Gitleaks default log level.
GO_CONFIG_FILE.golangci.ymlFilename for golangci-lint configuration (ex: .golangci.toml)
GROOVY_FAILON_LEVELwarningnpm-groovy-lint failon level.
GROOVY_LOG_LEVELinfonpm-groovy-lint log level.
IGNORE_GENERATED_FILESfalseIf set to true, super-linter will ignore all the files with @generated marker but without @not-generated marker.
IGNORE_GITIGNORED_FILESfalseIf set to true, super-linter will ignore all the files that are ignored by Git.
JAVA_COMMAND_ARGSnot setAdditional command options to pass to Checkstyle. For more information about the available options, see checkstyle command line usage.
JAVA_JVM_COMMAND_ARGSnot setAdditional command options to pass to the Java Virtual Machine (JVM) when running Checkstyle. For example, can be used to specify additional configuration parameters via Java properties, such as Suppression Filter files, for example: -Dorg.checkstyle.sun.suppressionfilter.config=path/to/suppressions.xml
JAVA_FILE_NAMEsun_checks.xmlFilename for Checkstyle configuration. Checkstyle embeds several configuration files, such as sun_checks.xml, google_checks.xml that you can use without providing your own configuration file.
JAVASCRIPT_ES_CONFIG_FILEeslint.config.mjsFilename for ESLint configuration
JSCPD_CONFIG_FILE.jscpd.jsonFilename for JSCPD configuration
JUPYTER_NBQA_BLACK_CONFIG_FILEValue of PYTHON_BLACK_CONFIG_FILE or .python-blackFilename for black configuration (ex: .isort.cfg, pyproject.toml)
JUPYTER_NBQA_FLAKE8_CONFIG_FILEValue of PYTHON_FLAKE8_CONFIG_FILE or .flake8Filename for flake8 configuration (ex: .flake8, tox.ini)
JUPYTER_NBQA_ISORT_CONFIG_FILEValue of PYTHON_ISORT_CONFIG_FILE or .isort.cfgFilename for isort configuration (ex: .isort.cfg, pyproject.toml)
JUPYTER_NBQA_MYPY_CONFIG_FILEValue of PYTHON_MYPY_CONFIG_FILE or .mypy.iniFilename for mypy configuration (ex: .mypy.ini, setup.config)
JUPYTER_NBQA_PYLINT_CONFIG_FILEValue of PYTHON_PYLINT_CONFIG_FILE or .python-lintFilename for pylint configuration (ex: .python-lint, .pylintrc)
JUPYTER_NBQA_RUFF_CONFIG_FILEValue of PYTHON_RUFF_CONFIG_FILE or .ruff.tomlFilename for ruff configuration when linting files.
KUBERNETES_KUBECONFORM_OPTIONSnot setAdditional arguments to pass to the command-line when running Kubeconform (Example: --ignore-missing-schemas)
LINTER_RULES_PATH.github/lintersDirectory for all linter configuration rules. For more information, see Configure Linters.
LOG_FILEsuper-linter.logThe filename for outputting logs. Super-linter saves the log file to ${DEFAULT_WORKSPACE}/${LOG_FILE}.
LOG_LEVELINFOHow much output the script will generate to the console. One of ERROR, WARN, NOTICE, INFO, or DEBUG.
MARKDOWN_CONFIG_FILE.markdown-lint.ymlFilename for Markdownlint configuration (ex: .markdown-lint.yml, .markdownlint.json, .markdownlint.yaml)
MARKDOWN_CUSTOM_RULE_GLOBSnot setComma-separated list of file globs matching custom Markdownlint rule files.
MULTI_STATUStrueA status API is made for each language that is linted to make visual parsing easier.
NATURAL_LANGUAGE_CONFIG_FILE.textlintrcFilename for textlint configuration (ex: .textlintrc)
OS_PACKAGES_CONFIG_FILE_NAMEos-packages.jsonName of the file that holds the list of operating system (OS) packages to install, in JSON format. Relative to LINTER_RULES_PATH. For more information, see Install additional dependencies.
PERL_PERLCRITIC_OPTIONSnullAdditional arguments to pass to the command-line when running perlcritic (Example: --theme community)
POWERSHELL_CONFIG_FILE.powershell-psscriptanalyzer.psd1Filename for PSScriptAnalyzer configuration
PHP_CONFIG_FILEphp.iniFilename for PHP Configuration (ex: php.ini)
PHP_PHPCS_FILE_NAMEphpcs.xmlFilename for PHP CodeSniffer (ex: .phpcs.xml, .phpcs.xml.dist)
PHP_PHPSTAN_CONFIG_FILEphpstan.neonFilename for PHPStan Configuration (ex: phpstan.neon)
PRETTIER_COMMAND_OPTIONSnot setAdditional options and arguments to add to the command when running Prettier. These options will be added to all Prettier invocations, regardless of the LANGUAGE.
PRE_COMMIT_COMMAND_ARGSnot setAdditional arguments to pass to the pre-commit command.
PRE_COMMIT_CONFIG_FILE.pre-commit-config.yamlFilename for pre-commit configuration
PROTOBUF_CONFIG_FILE.protolintrc.ymlFilename for protolint configuration (ex: .protolintrc.yml)
PYTHON_BLACK_CONFIG_FILE.python-blackFilename for black configuration (ex: .isort.cfg, pyproject.toml)
PYTHON_FLAKE8_CONFIG_FILE.flake8Filename for flake8 configuration (ex: .flake8, tox.ini)
PYTHON_ISORT_CONFIG_FILE.isort.cfgFilename for isort configuration (ex: .isort.cfg, pyproject.toml)
PYTHON_MYPY_CONFIG_FILE.mypy.iniFilename for mypy configuration (ex: .mypy.ini, setup.config)
PYTHON_PYLINT_CONFIG_FILE.python-lintFilename for pylint configuration (ex: .python-lint, .pylintrc)
PYTHON_RUFF_CONFIG_FILE.ruff.tomlFilename for ruff configuration when linting files.
PYTHON_RUFF_FORMAT_CONFIG_FILE.ruff.tomlFilename for ruff configuration when formatting files.
RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMESnot setComma-separated filenames for renovate shareable config preset (ex: default.json)
REMOVE_ANSI_COLOR_CODES_FROM_OUTPUTfalseIf set to true, Super-linter removes ANSI color codes from linters stdout and stderr files, and from the Super-linter log file.
RUBY_CONFIG_FILE.ruby-lint.ymlFilename for rubocop configuration (ex: .ruby-lint.yml, .rubocop.yml)
RUN_LOCALfalseSet this to true when running outside GitHub Actions or when you want to disable getting environment information from the GitHub Actions environment. For more information about running Super-linter outside GitHub Actions, see Run Super-Linter outside GitHub Actions.
RUST_CLIPPY_COMMAND_OPTIONSnot setAdditional options and arguments to add to the command when running Clippy.
SAVE_SUPER_LINTER_OUTPUTfalseIf set to true, Super-linter will save its output in the workspace. For more information, see Super-linter outputs.
SAVE_SUPER_LINTER_SUMMARYfalseIf set to true, Super-linter will save a summary. For more information, see Summary outputs.
SCALAFMT_CONFIG_FILE.scalafmt.confFilename for scalafmt configuration (ex: .scalafmt.conf)
SNAKEMAKE_SNAKEFMT_CONFIG_FILE.snakefmt.tomlFilename for Snakemake configuration (ex: pyproject.toml, .snakefmt.toml)
SSL_CERT_SECRETnoneCertification Authority (CA) cert to add to the Super-Linter trust store. This is needed for users on self-hosted runners or need to inject the certificate (ex. ${{secrets.SSL_CERT }})
SSH_KEYnoneSSH key that has access to your private repositories
SSH_SETUP_GITHUBfalseIf set to true, adds the github.com SSH key to known_hosts. This is ignored if SSH_KEY is provided - i.e. the github.com SSH key is always added if SSH_KEY is provided
SSH_INSECURE_NO_VERIFY_GITHUB_KEYfalseINSECURE - If set to true, does not verify the fingerprint of the github.com SSH key before adding this. This is not recommended!
SQLFLUFF_CONFIG_FILE/.sqlfluffFilename for SQLFLUFF configuration (ex: /.sqlfluff, pyproject.toml)
STRIP_DEFAULT_WORKSPACE_FOR_REGEXfalseSet this to true to strip the value of DEFAULT_WORKSPACE from the list of files to check. For more information, see Include or exclude files from checks.
SUPER_LINTER_OUTPUT_DIRECTORY_NAMEsuper-linter-outputName of the directory where super-linter saves its output.
SUPER_LINTER_SUMMARY_FILE_NAMEsuper-linter-summary.mdName of the file where to save the summary output. For more information, see Summary outputs.
SUPPRESS_FILE_TYPE_WARNfalseIf set to true, will hide warning messages about files without their proper extensions. Default is false
SUPPRESS_POSSUMfalseIf set to true, will hide the ASCII possum at top of log output. Default is false
TERRAFORM_TERRASCAN_CONFIG_FILEterrascan.tomlFilename for terrascan configuration (ex: terrascan.toml)
TERRAFORM_TFLINT_CONFIG_FILE.tflint.hclFilename for tfLint configuration (ex: .tflint.hcl)
TRIVY_CONFIG_FILEtrivy.yamlFilename for Trivy
TYPESCRIPT_ES_CONFIG_FILEeslint.config.mjsFilename for ESLint configuration
USE_FIND_ALGORITHMfalseBy default, we use git diff to find all files in the workspace and what has been updated, this would enable the Linux find method instead to find all files to lint
VALIDATE_ALL_CODEBASEtrueSet this to true to lint and format the entire workspace. Set this tofalse to lint and format new or changed files only. For more information, see VALIDATE_ALL_CODEBASE.
VALIDATE_ANSIBLEtrueFlag to enable or disable the linting process of the Ansible language.
VALIDATE_ARMtrueFlag to enable or disable the linting process of the ARM language.
VALIDATE_BASHtrueFlag to enable or disable the linting process of the Bash language.
VALIDATE_BASH_EXECtrueFlag to enable or disable the linting process of the Bash language to validate if file is stored as executable.
VALIDATE_BIOME_FORMATtrueOption to enable or disable the linting process with biome format.
VALIDATE_BIOME_LINTtrueOption to enable or disable the linting process with biome lint
VALIDATE_CPPtrueFlag to enable or disable the linting process of the C++ language.
VALIDATE_CHECKOVtrueFlag to enable or disable the linting process with Checkov
VALIDATE_CLANG_FORMATtrueFlag to enable or disable the linting process of the C++/C language with clang-format.
VALIDATE_CLOJUREtrueFlag to enable or disable the linting process of the Clojure language.
VALIDATE_CLOUDFORMATIONtrueFlag to enable or disable the linting process of the AWS Cloud Formation language.
VALIDATE_COFFEESCRIPTtrueFlag to enable or disable the linting process of the CoffeeScript language.
VALIDATE_CSHARPtrueFlag to enable or disable the linting process of the C# language.
VALIDATE_CSStrueFlag to enable or disable the linting process of the CSS, Sass, and SCSS files.
VALIDATE_CSS_PRETTIERtrueFlag to enable or disable checking the formatting of CSS, Sass, and SCSS files with Prettier.
VALIDATE_DARTtrueFlag to enable or disable the linting process of the Dart language.
VALIDATE_DOCKERFILE_HADOLINTtrueFlag to enable or disable the linting process of the Docker language.
VALIDATE_DOTNET_SLN_FORMAT_ANALYZERStrueOption to enable or disable the linting process of Dotnet solutions.
VALIDATE_DOTNET_SLN_FORMAT_STYLEtrueOption to enable or disable the linting process of Dotnet solutions.
VALIDATE_DOTNET_SLN_FORMAT_WHITESPACEtrueOption to enable or disable the linting process of Dotnet solutions.
VALIDATE_EDITORCONFIGtrueFlag to enable or disable the linting process with the EditorConfig.
VALIDATE_ENVtrueFlag to enable or disable the linting process of the ENV language.
VALIDATE_GIT_COMMITLINTtrueOption to enable or disable the linting process of Git commits with commitlint. commitlint needs a configuration file to work. Also, see the ENFORCE_COMMITLINT_CONFIGURATION_CHECK and the ENABLE_COMMITLINT_STRICT_MODE variables.
VALIDATE_GIT_MERGE_CONFLICT_MARKERStrueOption to enable or disable checking if files contain Git merge conflict markers.
VALIDATE_GITHUB_ACTIONStrueFlag to enable or disable the linting process of the GitHub Actions.
VALIDATE_GITHUB_ACTIONS_ZIZMORtrueFlag to enable or disable the linting process of GitHub Actions, Dependabot, GitHub Actions workflows configuration files using zizmor.
VALIDATE_GITLEAKStrueFlag to enable or disable the linting process of the secrets.
VALIDATE_GOtrueFlag to enable or disable the linting process of the individual Go files. Set this to false if you want to lint Go modules. See the VALIDATE_GO_MODULES variable.
VALIDATE_GO_MODULEStrueFlag to enable or disable the linting process of Go modules. Super-linter considers a directory to be a Go module if it contains a file namedgo.mod.
VALIDATE_GO_RELEASERtrueFlag to enable or disable the linting process of the GoReleaser config file.
VALIDATE_GRAPHQL_PRETTIERtrueFlag to enable or disable checking the formatting of GraphQL files with Prettier.
VALIDATE_GOOGLE_JAVA_FORMATtrueFlag to enable or disable the linting process of the Java language. (Utilizing: google-java-format)
VALIDATE_GROOVYtrueFlag to enable or disable the linting process of the language.
VALIDATE_HTMLtrueFlag to enable or disable the linting process of the HTML language.
VALIDATE_HTML_PRETTIERtrueFlag to enable or disable checking the formatting of HTML files with Prettier.
VALIDATE_JAVAtrueFlag to enable or disable the linting process of the Java language. (Utilizing: checkstyle)
VALIDATE_JAVASCRIPT_EStrueFlag to enable or disable the linting process of the JavaScript language. (Utilizing: ESLint)
VALIDATE_JAVASCRIPT_PRETTIERtrueFlag to enable or disable checking the formatting of JavaScript files with Prettier.
VALIDATE_JSCPDtrueFlag to enable or disable JSCPD.
VALIDATE_JSONtrueFlag to enable or disable the linting process of the JSON language.
VALIDATE_JSON_PRETTIERtrueFlag to enable or disable checking the formatting of JSON files with Prettier.
VALIDATE_JSONCtrueFlag to enable or disable the linting process of the JSONC and JSON5 languages.
VALIDATE_JSONC_PRETTIERtrueFlag to enable or disable checking the formatting of JSONC and JSON5 files with Prettier.
VALIDATE_JSXtrueFlag to enable or disable the linting process for jsx files (Utilizing: ESLint)
VALIDATE_JSX_PRETTIERtrueFlag to enable or disable checking the formatting of JSX files with Prettier.
VALIDATE_JUPYTER_NBQA_BLACKtrueFlag to enable or disable the linting process of Jupyter Notebooks. (Utilizing: nbqa black)
VALIDATE_JUPYTER_NBQA_FLAKE8trueFlag to enable or disable the linting process of Jupyter Notebooks. (Utilizing: nbqa flake8)
VALIDATE_JUPYTER_NBQA_ISORTtrueFlag to enable or disable the linting process of Jupyter Notebooks. (Utilizing: nbqa isort)
VALIDATE_JUPYTER_NBQA_MYPYtrueFlag to enable or disable the linting process of Jupyter Notebooks. (Utilizing: nbqa mypy)
VALIDATE_JUPYTER_NBQA_PYLINTtrueFlag to enable or disable the linting process of Jupyter Notebooks. (Utilizing: nbqa pylint)
VALIDATE_JUPYTER_NBQA_RUFFtrueFlag to enable or disable the linting process of Jupyter Notebooks. (Utilizing: nbqa ruff)
VALIDATE_KOTLINtrueFlag to enable or disable the linting process of the Kotlin language.
VALIDATE_KUBERNETES_KUBECONFORMtrueFlag to enable or disable linting Kubernetes files using Kubeconform.
VALIDATE_LATEXtrueFlag to enable or disable the linting process of the LaTeX language.
VALIDATE_LUAtrueFlag to enable or disable the linting process of the language.
VALIDATE_MARKDOWNtrueFlag to enable or disable the linting process of the Markdown language.
VALIDATE_MARKDOWN_PRETTIERtrueFlag to enable or disable checking the formatting of Markdown files with Prettier.
VALIDATE_NATURAL_LANGUAGEtrueFlag to enable or disable the linting process of the natural language.
VALIDATE_OPENAPItrueFlag to enable or disable the linting process of the OpenAPI language.
VALIDATE_PERLtrueFlag to enable or disable the linting process of the Perl language.
VALIDATE_PHPtrueFlag to enable or disable the linting process of the PHP language. (Utilizing: PHP built-in linter) (keep for backward compatibility)
VALIDATE_PHP_BUILTINtrueFlag to enable or disable the linting process of the PHP language. (Utilizing: PHP built-in linter)
VALIDATE_PHP_PHPCStrueFlag to enable or disable the linting process of the PHP language. (Utilizing: PHP CodeSniffer)
VALIDATE_PHP_PHPSTANtrueFlag to enable or disable the linting process of the PHP language. (Utilizing: PHPStan)
VALIDATE_PHP_PSALMtrueFlag to enable or disable the linting process of the PHP language. (Utilizing: PSalm)
VALIDATE_POWERSHELLtrueFlag to enable or disable the linting process of the PowerShell language.
VALIDATE_PRE_COMMITtrueFlag to enable or disable running pre-commit.
VALIDATE_PROTOBUFtrueFlag to enable or disable the linting process of the Protobuf language.
VALIDATE_PYTHONtrueFlag to enable or disable the linting process of the Python language. (Utilizing: pylint) (keep for backward compatibility)
VALIDATE_PYTHON_BLACKtrueFlag to enable or disable the linting process of the Python language. (Utilizing: black)
VALIDATE_PYTHON_FLAKE8trueFlag to enable or disable the linting process of the Python language. (Utilizing: flake8)
VALIDATE_PYTHON_ISORTtrueFlag to enable or disable the linting process of the Python language. (Utilizing: isort)
VALIDATE_PYTHON_MYPYtrueFlag to enable or disable the linting process of the Python language. (Utilizing: mypy)
VALIDATE_PYTHON_PYLINTtrueFlag to enable or disable the linting process of the Python language. (Utilizing: pylint)
VALIDATE_PYTHON_RUFFtrueFlag to enable or disable linting files using Ruff
VALIDATE_PYTHON_RUFF_FORMATtrueFlag to enable or disable formatting files using Ruff
VALIDATE_RtrueFlag to enable or disable the linting process of the R language.
VALIDATE_RENOVATEtrueFlag to enable or disable the linting process of the Renovate configuration files.
VALIDATE_RUBYtrueFlag to enable or disable the linting process of the Ruby language.
VALIDATE_RUST_2015trueFlag to enable or disable the linting process of the Rust language. (edition: 2015)
VALIDATE_RUST_2018trueFlag to enable or disable the linting process of Rust language. (edition: 2018)
VALIDATE_RUST_2021trueFlag to enable or disable the linting process of Rust language. (edition: 2021)
VALIDATE_RUST_2024trueFlag to enable or disable the linting process of Rust language. (edition: 2024)
VALIDATE_RUST_CLIPPYtrueFlag to enable or disable the clippy linting process of Rust language.
VALIDATE_SCALAFMTtrueFlag to enable or disable the linting process of Scala language. (Utilizing: scalafmt --test)
VALIDATE_SHELL_SHFMTtrueFlag to enable or disable the linting process of Shell scripts. (Utilizing: shfmt)
VALIDATE_SNAKEMAKE_LINTtrueFlag to enable or disable the linting process of Snakefiles. (Utilizing: snakemake --lint)
VALIDATE_SNAKEMAKE_SNAKEFMTtrueFlag to enable or disable the linting process of Snakefiles. (Utilizing: snakefmt)
VALIDATE_STATEStrueFlag to enable or disable the linting process for AWS States Language.
VALIDATE_SQLFLUFFtrueFlag to enable or disable the linting process of the SQL language. (Utilizing: sqlfuff)
VALIDATE_TERRAFORM_FMTtrueFlag to enable or disable checking the formatting process of the Terraform files.
VALIDATE_TERRAFORM_TERRASCANtrueFlag to enable or disable the linting process of the Terraform language for security related issues.
VALIDATE_TERRAFORM_TFLINTtrueFlag to enable or disable the linting process of the Terraform language. (Utilizing tflint)
VALIDATE_TERRAGRUNTtrueFlag to enable or disable the linting process for Terragrunt files.
VALIDATE_TRIVYtrueFlag to enable or disable running Trivy.
VALIDATE_TSXtrueFlag to enable or disable the linting process for tsx files (Utilizing: ESLint)
VALIDATE_TYPESCRIPT_EStrueFlag to enable or disable the linting process of the TypeScript language. (Utilizing: ESLint)
VALIDATE_TYPESCRIPT_PRETTIERtrueFlag to enable or disable checking the formatting of TypeScript files with Prettier.
VALIDATE_VUEtrueFlag to enable or disable the linting process of the vue files. (Utilizing: ESLint).
VALIDATE_VUE_PRETTIERtrueFlag to enable or disable checking the formatting of Vue files with Prettier.
VALIDATE_XMLtrueFlag to enable or disable the linting process of the XML language.
VALIDATE_YAMLtrueFlag to enable or disable the linting process of the YAML language.
VALIDATE_YAML_PRETTIERtrueFlag to enable or disable checking the formatting of YAML files with Prettier.
YAML_CONFIG_FILE.yaml-lint.ymlFilename for Yamllint configuration (ex:.yaml-lint.yml, .yamllint.yml)
YAML_ERROR_ON_WARNINGfalseFlag to enable or disable the error on warning for Yamllint.

The VALIDATE_[LANGUAGE] variables work as follows:

  • super-linter runs all supported linters by default.
  • If you set any of the VALIDATE_[LANGUAGE] variables to true, super-linter defaults to leaving any unset variable to false (only validate those languages).
  • If you set any of the VALIDATE_[LANGUAGE] variables to false, super-linter defaults to leaving any unset variable to true (only exclude those languages).
  • If you set any of the VALIDATE_[LANGUAGE] variables to both true and false, super-linter fails reporting an error.

For more information about reusing Super-linter configuration across environments, see Share Environment variables between environments.

VALIDATE_ALL_CODEBASE

To lint and format only the files that you changed or created, set VALIDATE_ALL_CODEBASE to false. To lint and format all the files in the workspace, set VALIDATE_ALL_CODEBASE to true (the default).

The following linters and formatters ignore the VALIDATE_ALL_CODEBASE variable, and always check the entire workspace:

  • Biome, because it supports its own mechanim to check changed files only. For more information, about configuring Biome to only check changed files, see Biome VCS integration doc.
  • Trivy, because while some Trivy scanners can work on changed files only, others expect to scan the entire workspace. For example, if you run the SBOM scanner against a subset of files, you'll unexpectedly get a partial SBOM.
  • Jscpd, because the most likely intended Jscpd use case is to search for duplicates across the entire workspace, not just across the changed files.

Fix linting and formatting issues

All the linters and formatters that Super-linter runs report errors if they detect linting or formatting issues without modifying your source code (check only mode). Check only mode is the default for all linters and formatters that Super-linter runs.

Certain linters and formatters support automatically fixing issues in your code (fix mode). You can enable fix mode for a particular linter or formatter by setting the relevant FIX_<language name> variable to true. To know which linters and formatters support fix mode, refer to the Configure Super-linter section.

Setting a FIX_<language name> variable to true implies setting the corresponding VALIDATE_<language name> to true. Setting a FIX_<language name> variable to true and the corresponding VALIDATE_<language name> to false is a configuration error. Super-linter reports that as a fatal error.

Super-linter supports the following locations to deliver fixes:

  • In the current Super-linter workspace, so you can process the changes to your files by yourself. For example:
    • If you're running Super-linter in your CI environment, such as GitHub Actions, you can commit and push changes as part of your workflow.
    • If you're running Super-linter locally, you can commit the changes as you would with any other change in your working directory.

Fix mode for ansible-lint

ansible-lint requires that the yaml rule is enabled to for the ansible-lint fix mode to work. The default ansible-lint configuration that Super-linter ships disables the yaml rule because it might not be compatible with yamllint. If you need to enable the ansible-lint fix mode, provide an ansible-lint configuration that doesn't ignore the yaml rule.

Fix mode for pre-commit

There is no FIX_PRE_COMMIT configuration variable because you can enable or disable fix mode for a pre-commit hook (if the hook supports that) by updating your pre-commit configuration file. To enable fix mode for a pre-commit hook, see the documentation of that hook.

Fix mode file and directory ownership

When fix mode is enabled, some linters and formatters don't maintain the original file or directory ownership, and use the user that Super-linter uses to run the linter or formatter.

Fix mode examples and workflows

You can configure Super-linter to automatically deliver linting and formatting fixes. For example, you can configure a workflow that automatically commits the fixes, and pushes them to a branch.

To ensure that Super-linter analyzes your codebase as expected, we recommend that you configure your fix mode workflows in addition to your existing Super-linter workflows.

GitHub Actions workflow example: push and pull request

The following example shows a GitHub Actions workflow that uses Super-linter to automatically fix linting and formatting issues, commit changes in the current branch, and push commits to the remote branch tracking the current branch whenever a you push commits on any branch, or when you create or update a pull request:

--- name: Linton: # yamllint disable-line rule:truthypush: nullpull_request: nullpermissions: contents: readjobs: lint: # Super-linter workflow running in check only mode# See https://github.com/super-linter/super-linter#get-startedfix-lint-issues: permissions: # To write linting fixescontents: write# To write Super-linter status checksstatuses: writeruns-on: ubuntu-lateststeps: - uses: actions/checkout@v5with: fetch-depth: 0persist-credentials: false - name: Super-Linteruses: super-linter/[email protected]# x-release-please-versionenv: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}# Set your fix mode variables to trueFIX_SHELL_SHFMT: trueFIX_YAML_PRETTIER: true# To reuse the same Super-linter configuration that you use in the# lint job without duplicating it, see# https://github.com/super-linter/super-linter/blob/main/docs/run-linter-locally.md#share-environment-variables-between-environments - name: Commit and push linting fixes# Run only on:# - Pull requests# - Not on the default branchif: > github.event_name == 'pull_request' && github.ref_name != github.event.repository.default_branchuses: stefanzweifel/git-auto-commit-action@v5with: branch: ${{github.event.pull_request.head.ref || github.head_ref || github.ref }}commit_message: "chore: fix linting issues"commit_user_name: super-lintercommit_user_email: [email protected]

This example uses GitHub Actions automatic token authentication that automatically creates a unique GITHUB_TOKEN secret for the workflow. GitHub Actions imposes the following limitations on workflows:

  • To avoid accidentally creating recursive workflow runs, the commit that contains linting and formatting fixes doesn't create new workflow runs.
  • It restricts edits to GitHub Actions workflows files (in .github/workflows).
  • It may fail pushing commits to protected branches.

To work around these limitations, you do the following:

  1. Create an authentication token with additional permissions.

  2. Grant the authentication token the repo and workflow permissions.

  3. Use the authentication token in the actions/checkout step:

    - uses: actions/checkout@v5with: fetch-depth: 0token: ${{secrets.SUPER_LINTER_TOKEN }}

    This example assumes that you saved the authentication token in a secret called SUPER_LINTER_TOKEN, but you can choose whatever name you prefer for the secret.

Configure linters

Super-linter provides default configurations for some linters in the TEMPLATES directory. You can customize the configuration for the linters that support this by placing your own configuration files in the LINTER_RULES_PATH directory. LINTER_RULES_PATH is relative to the DEFAULT_WORKSPACE directory.

By providing your own configuration files, Super-linter will ignore default configuration files. For example, if you provide your own configuration file for a linter, you can enable more checks and rules than what Super-linter enables by default for that linter, or disable some checks and rules that you don't need to enable. Super-linter configures some linters to enable more checks and rules than linters would by default, so by providing your own configuration file, ensure that you enable all checks and rules that you need for your use case.

Super-linter supports customizing the name of these configuration files. For more information, refer to Configure super-linter.

For example, you can configure Super-linter to:

  • Load configuration files from the config/lint directory in your repository:

    env: LINTER_RULES_PATH: config/lint
  • Load configuration files from the root directory of your repository:

    env: LINTER_RULES_PATH: .

In order to facilitate migrations from using standalone linters and formatters to super-linter, the following linters and formatters don't load configuration files from LINTER_RULES_PATH, but rather they use their own mechanism to discover and load configuration files. To configure these linters and formatters, see:

Some of the linters and formatters that super-linter provides can be configured to disable certain rules or checks, and to ignore certain files or part of them.

For more information about how to configure each linter or formatter, review their own documentation.

Include or exclude files from checks

If you need to include or exclude directories from being checked, you can use two environment variables: FILTER_REGEX_INCLUDE and FILTER_REGEX_EXCLUDE.

For example:

  • Lint the src folder in the root of the repository: FILTER_REGEX_INCLUDE: ^src/
  • Lint all src folders in the repository: FILTER_REGEX_INCLUDE: (^|/)src/
  • Do not lint files inside test folder in the root of the repository: FILTER_REGEX_EXCLUDE: ^test/
  • Do not lint files inside all test folders in the repository: FILTER_REGEX_EXCLUDE: (^|/)test/
  • Do not lint JavaScript files inside test folder in the root of the repository: FILTER_REGEX_EXCLUDE: ^test/[^/]+\.js$
  • Do not lint JavaScript files inside test folder in the root of the repository (recursively): FILTER_REGEX_EXCLUDE: ^test/.+\.js$
  • Do not lint files named gradlew and JavaScript files inside a specific directory: FILTER_REGEX_EXCLUDE: ((^|/)gradlew|^specific/directory/[^/]+\.js)$

To use regular expressions that check starting from the beginning of the string (using ^), set STRIP_DEFAULT_WORKSPACE_FOR_REGEX to true.

Additionally, if you set IGNORE_GENERATED_FILES to true, super-linter ignores any file with @generated string in it, unless the file also has @not-generated marker. For example, super-linter considers a file with the following contents as generated:

#!/bin/shecho"@generated"

while considers this file as not generated:

#!/bin/shecho"@generated"# @not-generated

Finally, you can set IGNORE_GITIGNORED_FILES to true to ignore a file if Git ignores it too.

Tools that always check the entire workspace

The following linters and formatters ignore the FILTER_REGEX_INCLUDE, FILTER_REGEX_EXCLUDE, IGNORE_GENERATED_FILES, IGNORE_GITIGNORED_FILES, VALIDATE_ALL_CODEBASE variables, and always check the entire workspace:

  • ansible-lint
  • Biome
  • Jscpd
  • Checkov
  • pre-commit
  • Trivy

When running these linters and formatters, Super-linter demands to them the task of building the list of files that they should check.

To include or exclude files when using the tools in the preceding list, use their own ignoring mechanisms.

GitHub Actions events

When you trigger a workflow with a step that runs Super-linter on GitHub Actions on specific events, consider the following if you set VALIDATE_ALL_CODEBASE to false (the default):

  • push events: Super-linter checks only the files that were modified in the commits you pushed.
  • pull_request, pull_request_target, and workflow_dispatch events: Super-linter checks all the files that you modified compared to the repository default branch.
  • schedule events: Super-linter will not find any files to check because schedule events run against the repository default branch (GitHub Actions set GITHUB_SHA to the last commit on the default branch, and GITHUB_REF to the default branch on schedule events). So, Super-linter doesn't have enough information to compute the set of files that changed. For schedule events, we recommend that you set VALIDATE_ALL_CODEBASE to true.

Run Super-Linter outside GitHub Actions

You don't need GitHub Actions to run super-linter. It supports several runtime environments.

Run using a container runtime engine

You can run super-linter outside GitHub Actions. For example, you can run super-linter from a shell:

docker run \ -e LOG_LEVEL=DEBUG \ -e RUN_LOCAL=true \ -v /path/to/local/codebase:/tmp/lint \ ghcr.io/super-linter/super-linter:latest

For more information, see Run super-linter outside GitHub Actions.

Use your own SSH key and certificate

If you need to use your own SSH key to authenticate against private repositories, you can use the SSH_KEY environment variable. The value of that environment variable is expected to be the private key of an SSH keypair that has access to your private repositories.

For example, you can configure this private key as an Encrypted Secret and access it with the secrets parameter from your GitHub Actions workflow:

env: SSH_KEY: ${{secrets.SSH_PRIVATE_KEY }}

If you need to inject a certification authority (CA) certificate in the operating system trust store, you can use the SSL_CERT_SECRET variable. The value of that variable is expected to be the path to the files that contains a CA that can be used to validate the certificate:

env: SSL_CERT_SECRET: ${{secrets.ROOT_CA }}

Outputs

Super-linter supports generating several outputs, and also supports exposing the output of individual linters.

Summary outputs

Super-linter writes a summary of all the checks:

  • If SAVE_SUPER_LINTER_SUMMARY is set to true, Super-linter writes a summary to ${DEFAULT_WORKSPACE}/${SUPER_LINTER_OUTPUT_DIRECTORY_NAME}/${SUPER_LINTER_SUMMARY_FILE_NAME}.
  • If ENABLE_GITHUB_ACTIONS_STEP_SUMMARY is set to true, Super-linter writes a GitHub Actions job summary. Setting ENABLE_GITHUB_ACTIONS_STEP_SUMMARY to true, implies setting SAVE_SUPER_LINTER_SUMMARY to true.

The summary is in Markdown format. Super-linter supports the following formats:

  • Table (default)

The summary output of previous Super-linter runs is not preserved.

Super-linter outputs

If you set SAVE_SUPER_LINTER_OUTPUT to true, Super-linter saves its output to ${DEFAULT_WORKSPACE}/${SUPER_LINTER_OUTPUT_DIRECTORY_NAME}/super-linter, so you can further process it, if needed.

Most outputs are in JSON format.

The output of previous Super-linter runs is not preserved.

Linter reports and outputs

Some linters support configuring the format of their outputs for further processing. To get access to that output, enable it using the respective linter configuration file. If a linter requires a path for the output directory, you can use the value of the ${DEFAULT_WORKSPACE} variable.

If a linter doesn't support setting an arbitrary output path as described in the previous paragraph, but only supports emitting results to standard output or standard error streams, you can enable Super-linter outputs and parse them.

Ignore output that Super-linter generates

Super-linter generates output reports and logs. To avoid that these outputs end up in your repository, we recommend that you add the following lines to your .gitignore file:

# Super-linter outputs super-linter-output super-linter.log # GitHub Actions leftovers github_conf 

Install additional dependencies

Super-linter supports installing dependencies at runtime, on each Super-linter run. For more information about installing additional dependencies when running Super-linter, see Install additional dependencies.

Super-Linter is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Super-linter is a ready-to-run collection of linters and code analyzers, to help validate your source code
v8.3.0
Latest

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Super-Linter is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.