Giter Club home page Giter Club logo

super-linter / super-linter Goto Github PK

View Code? Open in Web Editor NEW
9.2K 304.0 924.0 28.37 MB

Combination of multiple linters to run as a GitHub Action or standalone

Home Page: https://github.com/super-linter/super-linter

License: MIT License

Shell 58.87% Dockerfile 6.73% CoffeeScript 2.64% JavaScript 12.12% Perl 1.56% Python 2.81% Ruby 7.18% Go 0.31% HCL 2.00% TypeScript 0.39% CSS 0.38% PowerShell 0.82% PHP 1.10% Kotlin 0.10% Clojure 0.96% HTML 0.76% Dart 0.07% Groovy 0.26% Lua 0.19% Java 0.73%
linter actions ci quality-check code-quality code-quality-analyzer super-linter

super-linter's Introduction

Super-Linter

Super-linter is a ready-to-run collection of linters and code analyzers, to help validate 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 is licensed under a 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 and 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 :).

Supported linters and code analyzers

Super-linter supports the following tools:

Language Linter
Ansible ansible-lint
AWS CloudFormation templates cfn-lint
Azure Resource Manager (ARM) arm-ttk
C++ cpp-lint / clang-format
C# dotnet format / clang-format
CSS stylelint
Clojure clj-kondo
CoffeeScript coffeelint
Copy/paste detection jscpd
Dart dartanalyzer
Dockerfile hadolint
EditorConfig editorconfig-checker
ENV dotenv-linter
Gherkin gherkin-lint
GitHub Actions actionlint
Golang golangci-lint
GoReleser GoReleser
Groovy npm-groovy-lint
HTML HTMLHint
Java checkstyle / google-java-format
JavaScript ESLint / standard js
JSON eslint-plugin-json
JSONC eslint-plugin-jsonc
Infrastructure as code Checkov
Kubernetes kubeconform
Kotlin ktlint
LaTeX ChkTex
Lua luacheck
Markdown markdownlint
Natural language textlint
OpenAPI spectral
Perl perlcritic
PHP PHP built-in linter / PHP CodeSniffer / PHPStan / Psalm
PowerShell PSScriptAnalyzer
Protocol Buffers protolint
Python3 pylint / flake8 / black / isort / ruff
R lintr
Raku Raku
Renovate renovate-config-validator
Ruby RuboCop
Rust Rustfmt / Clippy
Scala scalafmt
Secrets GitLeaks
Shell ShellCheck / executable bit check / shfmt
Snakemake snakefmt / snakemake --lint
SQL sql-lint / sqlfluff
Tekton tekton-lint
Terraform fmt / tflint / terrascan
Terragrunt terragrunt
TypeScript ESLint / standard js
XML LibXML
YAML YamlLint

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: Lint
    
    on:  # yamllint disable-line rule:truthy
      push: null
      pull_request: null
    
    permissions: { }
    
    jobs:
      build:
        name: Lint
        runs-on: ubuntu-latest
    
        permissions:
          contents: read
          packages: read
          # To report GitHub Actions status checks
          statuses: write
    
        steps:
          - name: Checkout code
            uses: actions/checkout@v4
            with:
              # super-linter needs the full git history to get the
              # list of files that changed across commits
              fetch-depth: 0
    
          - name: Super-linter
            uses: super-linter/[email protected]  # x-release-please-version
            env:
              # To report GitHub Actions status checks
              GITHUB_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:

    • rust linters
    • dotenv linters
    • armttk linters
    • pwsh linters
    • c# linters

Configure super-linter

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

Environment variable Default Value Description
ANSIBLE_CONFIG_FILE .ansible-lint.yml Filename for Ansible-lint configuration (ex: .ansible-lint, .ansible-lint.yml)
ANSIBLE_DIRECTORY /ansible Flag 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_LIBRARIES false If set to true, shell files with a file extension and no shebang line are ignored when checking if the executable bit is set.
BASH_SEVERITY style Specify 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.yaml Configuration filename for Checkov.
CLANG_FORMAT_FILE_NAME .clang-format Configuration filename for clang-format.
CREATE_LOG_FILE false If 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.json Filename for Stylelint configuration (ex: .stylelintrc.yml, .stylelintrc.yaml)
DEFAULT_BRANCH Default repository branch when running on GitHub Actions, master otherwise The name of the repository default branch. There's no need to configure this variable when running on GitHub Actions
DEFAULT_WORKSPACE /tmp/lint The 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_ERRORS false Flag to have the linter complete with exit code 0 even if errors were detected.
DOCKERFILE_HADOLINT_FILE_NAME .hadolint.yaml Filename for hadolint configuration (ex: .hadolintlintrc.yaml)
EDITORCONFIG_FILE_NAME .ecrc Filename for editorconfig-checker configuration
ENABLE_GITHUB_ACTIONS_GROUP_TITLE false if RUN_LOCAL=true, true otherwise Flag to enable GitHub Actions log grouping.
FILTER_REGEX_EXCLUDE not set Regular expression defining which files will be excluded from linting (ex: .*src/test.*). Not setting this variable means to process all files.
FILTER_REGEX_INCLUDE not set Regular 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.
GITHUB_ACTIONS_CONFIG_FILE actionlint.yml Filename for Actionlint configuration (ex: actionlint.yml)
GITHUB_ACTIONS_COMMAND_ARGS null Additional arguments passed to actionlint command. Useful to ignore some errors
GITHUB_CUSTOM_API_URL https://api.${GITHUB_DOMAIN} Specify a custom GitHub API URL in case GitHub Enterprise is used: e.g. https://github.myenterprise.com/api/v3
GITHUB_DOMAIN github.com Specify a custom GitHub domain in case GitHub Enterprise is used: e.g. github.myenterprise.com
GITLEAKS_CONFIG_FILE .gitleaks.toml Filename for GitLeaks configuration (ex: .gitleaks.toml)
IGNORE_GENERATED_FILES false If set to true, super-linter will ignore all the files with @generated marker but without @not-generated marker.
IGNORE_GITIGNORED_FILES false If set to true, super-linter will ignore all the files that are ignored by Git.
JAVA_FILE_NAME sun_checks.xml Filename 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_DEFAULT_STYLE standard Flag to set the default style of JavaScript. Available options: standard/prettier
JAVASCRIPT_ES_CONFIG_FILE .eslintrc.yml Filename for ESLint configuration (ex: .eslintrc.yml, .eslintrc.json)
JSCPD_CONFIG_FILE .jscpd.json Filename for JSCPD configuration
KUBERNETES_KUBECONFORM_OPTIONS null Additional arguments to pass to the command-line when running Kubernetes Kubeconform (Example: --ignore-missing-schemas)
LINTER_RULES_PATH .github/linters Directory for all linter configuration rules.
LOG_FILE super-linter.log The filename for outputting logs. All output is sent to the log file regardless of LOG_LEVEL.
LOG_LEVEL INFO How much output the script will generate to the console. One of ERROR, WARN, NOTICE, INFO, or DEBUG.
MARKDOWN_CONFIG_FILE .markdown-lint.yml Filename for Markdownlint configuration (ex: .markdown-lint.yml, .markdownlint.json, .markdownlint.yaml)
MARKDOWN_CUSTOM_RULE_GLOBS .markdown-lint/rules,rules/** Comma-separated list of file globs matching custom Markdownlint rule files.
MULTI_STATUS true A status API is made for each language that is linted to make visual parsing easier.
NATURAL_LANGUAGE_CONFIG_FILE .textlintrc Filename for textlint configuration (ex: .textlintrc)
PERL_PERLCRITIC_OPTIONS null Additional arguments to pass to the command-line when running perlcritic (Example: --theme community)
PHP_CONFIG_FILE php.ini Filename for PHP Configuration (ex: php.ini)
PHP_PHPCS_FILE_NAME phpcs.xml Filename for PHP CodeSniffer (ex: .phpcs.xml, .phpcs.xml.dist)
PROTOBUF_CONFIG_FILE .protolintrc.yml Filename for protolint configuration (ex: .protolintrc.yml)
PYTHON_BLACK_CONFIG_FILE .python-black Filename for black configuration (ex: .isort.cfg, pyproject.toml)
PYTHON_FLAKE8_CONFIG_FILE .flake8 Filename for flake8 configuration (ex: .flake8, tox.ini)
PYTHON_ISORT_CONFIG_FILE .isort.cfg Filename for isort configuration (ex: .isort.cfg, pyproject.toml)
PYTHON_MYPY_CONFIG_FILE .mypy.ini Filename for mypy configuration (ex: .mypy.ini, setup.config)
PYTHON_PYLINT_CONFIG_FILE .python-lint Filename for pylint configuration (ex: .python-lint, .pylintrc)
PYTHON_RUFF_CONFIG_FILE .ruff.toml Filename for ruff configuration
RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES not set Comma-separated filenames for renovate shareable config preset (ex: default.json)
RUBY_CONFIG_FILE .ruby-lint.yml Filename for rubocop configuration (ex: .ruby-lint.yml, .rubocop.yml)
SCALAFMT_CONFIG_FILE .scalafmt.conf Filename for scalafmt configuration (ex: .scalafmt.conf)
SNAKEMAKE_SNAKEFMT_CONFIG_FILE .snakefmt.toml Filename for Snakemake configuration (ex: pyproject.toml, .snakefmt.toml)
SSL_CERT_SECRET none SSL cert to add to the Super-Linter trust store. This is needed for users on self-hosted runners or need to inject the cert for security standards (ex. ${{ secrets.SSL_CERT }})
SSH_KEY none SSH key that has access to your private repositories
SSH_SETUP_GITHUB false If 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_KEY false INSECURE - If set to true, does not verify the fingerprint of the github.com SSH key before adding this. This is not recommended!
SQL_CONFIG_FILE .sql-config.json Filename for SQL-Lint configuration (ex: sql-config.json , .config.json)
SQLFLUFF_CONFIG_FILE /.sqlfluff Filename for SQLFLUFF configuration (ex: /.sqlfluff, pyproject.toml)
SUPPRESS_FILE_TYPE_WARN false If set to true, will hide warning messages about files without their proper extensions. Default is false
SUPPRESS_POSSUM false If set to true, will hide the ASCII possum at top of log output. Default is false
TERRAFORM_TERRASCAN_CONFIG_FILE terrascan.toml Filename for terrascan configuration (ex: terrascan.toml)
TERRAFORM_TFLINT_CONFIG_FILE .tflint.hcl Filename for tfLint configuration (ex: .tflint.hcl)
TYPESCRIPT_DEFAULT_STYLE ts-standard Flag to set the default style of TypeScript. Available options: ts-standard/prettier
TYPESCRIPT_ES_CONFIG_FILE .eslintrc.yml Filename for ESLint configuration (ex: .eslintrc.yml, .eslintrc.json)
TYPESCRIPT_STANDARD_TSCONFIG_FILE ${DEFAULT_WORKSPACE}/tsconfig.json Path to the TypeScript project configuration in ts-standard. The path is relative to DEFAULT_WORKSPACE
USE_FIND_ALGORITHM false By 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_CODEBASE true Will parse the entire repository and find all files to validate across all types. NOTE: When set to false, only new or edited files will be parsed for validation.
VALIDATE_ANSIBLE true Flag to enable or disable the linting process of the Ansible language.
VALIDATE_ARM true Flag to enable or disable the linting process of the ARM language.
VALIDATE_BASH true Flag to enable or disable the linting process of the Bash language.
VALIDATE_BASH_EXEC true Flag to enable or disable the linting process of the Bash language to validate if file is stored as executable.
VALIDATE_CPP true Flag to enable or disable the linting process of the C++ language.
VALIDATE_CHECKOV true Flag to enable or disable the linting process with Checkov
VALIDATE_CLANG_FORMAT true Flag to enable or disable the linting process of the C++/C language with clang-format.
VALIDATE_CLOJURE true Flag to enable or disable the linting process of the Clojure language.
VALIDATE_CLOUDFORMATION true Flag to enable or disable the linting process of the AWS Cloud Formation language.
VALIDATE_COFFEESCRIPT true Flag to enable or disable the linting process of the Coffeescript language.
VALIDATE_CSHARP true Flag to enable or disable the linting process of the C# language.
VALIDATE_CSS true Flag to enable or disable the linting process of the CSS language.
VALIDATE_DART true Flag to enable or disable the linting process of the Dart language.
VALIDATE_DOCKERFILE_HADOLINT true Flag to enable or disable the linting process of the Docker language.
VALIDATE_EDITORCONFIG true Flag to enable or disable the linting process with the EditorConfig.
VALIDATE_ENV true Flag to enable or disable the linting process of the ENV language.
VALIDATE_GHERKIN true Flag to enable or disable the linting process of the Gherkin language.
VALIDATE_GITHUB_ACTIONS true Flag to enable or disable the linting process of the GitHub Actions.
VALIDATE_GITLEAKS true Flag to enable or disable the linting process of the secrets.
VALIDATE_GO true Flag to enable or disable the linting process of the individual Golang files. Set this to false if you want to lint Go modules. See the VALIDATE_GO_MODULES variable.
VALIDATE_GO_MODULES true Flag 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 named go.mod.
VALIDATE_GO_RELEASER true Flag to enable or disable the linting process of the GoReleaser config file.
VALIDATE_GOOGLE_JAVA_FORMAT true Flag to enable or disable the linting process of the Java language. (Utilizing: google-java-format)
VALIDATE_GROOVY true Flag to enable or disable the linting process of the language.
VALIDATE_HTML true Flag to enable or disable the linting process of the HTML language.
VALIDATE_JAVA true Flag to enable or disable the linting process of the Java language. (Utilizing: checkstyle)
VALIDATE_JAVASCRIPT_ES true Flag to enable or disable the linting process of the JavaScript language. (Utilizing: ESLint)
VALIDATE_JAVASCRIPT_STANDARD true Flag to enable or disable the linting process of the JavaScript language. (Utilizing: standard)
VALIDATE_JSCPD true Flag to enable or disable the JSCPD.
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_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.
VALIDATE_MARKDOWN true Flag to enable or disable the linting process of the Markdown language.
VALIDATE_NATURAL_LANGUAGE true Flag to enable or disable the linting process of the natural language.
VALIDATE_OPENAPI true Flag to enable or disable the linting process of the OpenAPI language.
VALIDATE_PERL true Flag to enable or disable the linting process of the Perl language.
VALIDATE_PHP true Flag to enable or disable the linting process of the PHP language. (Utilizing: PHP built-in linter) (keep for backward compatibility)
VALIDATE_PHP_BUILTIN true Flag to enable or disable the linting process of the PHP language. (Utilizing: PHP built-in linter)
VALIDATE_PHP_PHPCS true Flag to enable or disable the linting process of the PHP language. (Utilizing: PHP CodeSniffer)
VALIDATE_PHP_PHPSTAN true Flag to enable or disable the linting process of the PHP language. (Utilizing: PHPStan)
VALIDATE_PHP_PSALM true Flag to enable or disable the linting process of the PHP language. (Utilizing: PSalm)
VALIDATE_POWERSHELL true Flag to enable or disable the linting process of the Powershell language.
VALIDATE_PROTOBUF true Flag to enable or disable the linting process of the Protobuf language.
VALIDATE_PYTHON true Flag to enable or disable the linting process of the Python language. (Utilizing: pylint) (keep for backward compatibility)
VALIDATE_PYTHON_BLACK true Flag to enable or disable the linting process of the Python language. (Utilizing: black)
VALIDATE_PYTHON_FLAKE8 true Flag to enable or disable the linting process of the Python language. (Utilizing: flake8)
VALIDATE_PYTHON_ISORT true Flag to enable or disable the linting process of the Python language. (Utilizing: isort)
VALIDATE_PYTHON_MYPY true Flag to enable or disable the linting process of the Python language. (Utilizing: mypy)
VALIDATE_PYTHON_PYLINT true Flag to enable or disable the linting process of the Python language. (Utilizing: pylint)
VALIDATE_PYTHON_RUFF true Flag to enable or disable the linting process of the Python language. (Utilizing: ruff)
VALIDATE_R true Flag to enable or disable the linting process of the R language.
VALIDATE_RAKU true Flag to enable or disable the linting process of the Raku language.
VALIDATE_RENOVATE true Flag to enable or disable the linting process of the Renovate configuration files.
VALIDATE_RUBY true Flag to enable or disable the linting process of the Ruby language.
VALIDATE_RUST_2015 true Flag to enable or disable the linting process of the Rust language. (edition: 2015)
VALIDATE_RUST_2018 true Flag to enable or disable the linting process of Rust language. (edition: 2018)
VALIDATE_RUST_2021 true Flag to enable or disable the linting process of Rust language. (edition: 2021)
VALIDATE_RUST_CLIPPY true Flag to enable or disable the clippy linting process of Rust language.
VALIDATE_SCALAFMT true Flag to enable or disable the linting process of Scala language. (Utilizing: scalafmt --test)
VALIDATE_SHELL_SHFMT true Flag to enable or disable the linting process of Shell scripts. (Utilizing: shfmt)
VALIDATE_SNAKEMAKE_LINT true Flag to enable or disable the linting process of Snakefiles. (Utilizing: snakemake --lint)
VALIDATE_SNAKEMAKE_SNAKEFMT true Flag to enable or disable the linting process of Snakefiles. (Utilizing: snakefmt)
VALIDATE_STATES true Flag to enable or disable the linting process for AWS States Language.
VALIDATE_SQL true Flag to enable or disable the linting process of the SQL language.
VALIDATE_SQLFLUFF true Flag to enable or disable the linting process of the SQL language. (Utilizing: sqlfuff)
VALIDATE_TEKTON true Flag to enable or disable the linting process of the Tekton language.
VALIDATE_TERRAFORM_FMT true Flag to enable or disable the formatting process of the Terraform files.
VALIDATE_TERRAFORM_TERRASCAN true Flag to enable or disable the linting process of the Terraform language for security related issues.
VALIDATE_TERRAFORM_TFLINT true Flag to enable or disable the linting process of the Terraform language. (Utilizing tflint)
VALIDATE_TERRAGRUNT true Flag to enable or disable the linting process for Terragrunt files.
VALIDATE_TSX true Flag to enable or disable the linting process for tsx files (Utilizing: ESLint)
VALIDATE_TYPESCRIPT_ES true Flag to enable or disable the linting process of the TypeScript language. (Utilizing: ESLint)
VALIDATE_TYPESCRIPT_STANDARD true Flag to enable or disable the linting process of the TypeScript language. (Utilizing: ts-standard)
VALIDATE_XML true Flag to enable or disable the linting process of the XML language.
VALIDATE_YAML true Flag to enable or disable the linting process of the YAML language.
YAML_CONFIG_FILE .yaml-lint.yml Filename for Yamllint configuration (ex: .yaml-lint.yml, .yamllint.yml)
YAML_ERROR_ON_WARNING false Flag 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.

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.

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`

Some of the linters 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, 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 only the src folder: FILTER_REGEX_INCLUDE: .*src/.*
  • Do not lint files inside test folder: FILTER_REGEX_EXCLUDE: .*test/.*
  • Do not lint JavaScript files inside test folder: FILTER_REGEX_EXCLUDE: .*test/.*.js

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/sh
echo "@generated"

while considers this file as not generated:

#!/bin/sh
echo "@generated" # @not-generated

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

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 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 SSL certificate into the 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 valide the certificate:

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

How to contribute

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

super-linter's People

Contributors

admiralawkbar avatar assignuser avatar cesar-rodriguez avatar colwynlegitscript avatar cvega avatar dependabot[bot] avatar eddynaka avatar ferrarimarco avatar filips123 avatar gabofdc avatar github-actions[bot] avatar goedelsoup avatar hanse00 avatar iamhughes avatar josephmarino avatar jsoref avatar jwiebalk avatar kpj avatar lindluni avatar massongit avatar mshimokura avatar nemchik avatar nvuillam avatar peterdavehello avatar quackduck avatar seankilleen avatar tunetheweb avatar v1v avatar web-flow avatar zkoppert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

super-linter's Issues

To override LINTER_PATH

Is your feature request related to a problem? Please describe.
Most of the existing repo will already have existing lint rules, and most of them will be placed in root directory of project.

Moving all of them to LINTER_PATH (e.g. .github/linters) wil require either some duplication or breaking exiting way to run lint locally

Describe the solution you'd like
To have ability to override this param LINTER_PATH.

Describe alternatives you've considered
NA

Additional context
NA

Add Support for disabling errors (info-only runs)

Is your feature request related to a problem? Please describe.

I have a repository of legacy markdown files that super-linter would be really useful for. I've also encountered similar situations with other repositories in the past. Sometimes, I'm not looking for a pass/fail, but rather for counts of issues so that I can monitor a trend.

Describe the solution you'd like

I'd love to see an option that doesn't fail the build when a linter doesn't pass -- that surfaces the information but returns an exit code of 0. This way, I can see the counts for informational purposes, and also verify as I'm getting things into shape that the counts really are dropping. Then, I can turn on the linter for "warnings as errors" essentially.

Describe alternatives you've considered

  • Using a different, specific linter that has this option.
  • Attempting to capture the exit code myself
  • Not using a linter in my build until I've fixed it up locally.

Support the GitHub Checks Run UI

Is your feature request related to a problem? Please describe.
After the super-linters runs, you have to go to the workflow logs, and then the step, and look at the logs, to see the errors that were found. This is not ideal and error-prone.

Describe the solution you'd like
A better approach would be to use the Checks Run UI to report the errors directly into the PR/code lines, to better visibility.

Describe alternatives you've considered
Other linters already do this like https://github.com/andrewmcodes/rubocop-linter-action and https://github.com/devmasx/brakeman-linter-action

Additional context
I think this is a really big feature, but it will also improve a lot the super-linter, and we could leverage how others already do it.

Upgrade Rubocop to Latest

Is your feature request related to a problem? Please describe.
We were looking to move from running Rubocop locally to super-linter but super-linter uses a version from about 1 year ago (0.74). https://github.com/rubocop-hq/rubocop/releases has 0.85.1 as the latest right now.

Describe the solution you'd like
Upgrade to a more recent version of rubocop, or enable this to be configured by user.

Thanks!

Wiki page has incorrect github actions example

Describe the bug

https://github.com/github/super-linter/wiki has an example with the below line of yaml for using super linter in a github action

      - name: Lint Code Base
        uses: docker://github/[email protected]

It should probably be

      - name: Lint Code Base
        uses: github/[email protected]

So take off the docker:// bit and (maybe) bump to the latest version.

Note: This wiki page is linked from the github.blog post announcing this project, so it was the first thing I (and probably others will) read. The README.md in the repo root is correct.

Add webhint

webhint seems like a good addition to the list of linters. Checks a11y, cross-browser compat, other best practices on HTML, CSS, etc.

Restructure linter flags

Is your feature request related to a problem? Please describe.
As discussed in #7, we'd like to be able to run each individual linter in a separate process.
To do this, we need an easy way to enable only one specific linter per process.

Describe the solution you'd like
Rather than defaulting to linting all supported languages, and taking an environment variable to disable a specific language. I think we should:

Default to linting all languages (A reasonable default for the end user to expect, if they do not mess with any environment variables), but use variables to enable specific languages.
Meaning if no variables are present, lint all. If one variable is present, lint only that language, two variables is two languages, etc.

Describe alternatives you've considered
We could leave the variables to work the way they do now. However this means that if support is added for new languages, the variables passed to any one instance of the application, would have to be modified to disable the new language.

Additional context
Please read #7.

Add flags to check only new code

Currently, the linter checks the entire code base. This is fine, but there should be a flag to only check new files or edited files.

  • example:
- name: Lint Code Base
    uses: docker://admiralawkbar/super-linter:latest
     env:
        validate-everything: false

Linter consumes my *-lint.yaml files

Docker command goes nom nom nom on my lint files! 🍽

When I run the super-linter locally following the directions from here my .github/linters/markdown-lint.yaml file gets removed.

Here is the commands and the very verbose output:
TL;DR - Essentially I ls the yaml file, run the docker command, and then lsthe file to prove it has been removed.

Zacherys-MBP:tmp zkoppert$ !ls
ls .github/linters/.markdown-lint.yml
.github/linters/.markdown-lint.yml
Zacherys-MBP:tmp zkoppert$ docker run -e RUN_LOCAL=true -v /Users/zkoppert/repos/department-of-veterans-affairs/tmp:/tmp/lint admiralawkbar/super-linter

---------------------------------------------
------ Github Actions Language Linter -------
---------------------------------------------

---------------------------------------------
The Super-Linter source code can be found at:
 - https://github.com/github/super-linter
---------------------------------------------
--------------------------------------------
Gathering GitHub information...
NOTE: ENV VAR [RUN_LOCAL] has been set to:[true]
bypassing GitHub Actions variables...
Linting all files in mapped directory:[/tmp/lint]

--------------------------------------------
Gathering User provided information...
- Validating [YML] files in code base...
- Validating [JSON] files in code base...
- Validating [XML] files in code base...
- Validating [MARKDOWN] files in code base...
- Validating [BASH] files in code base...
- Validating [PERL] files in code base...
- Validating [PYTHON] files in code base...
- Validating [RUBY] files in code base...
- Validating [COFFEE] files in code base...
- Validating [ANSIBLE] files in code base...
- Validating [JAVASCRIPT] files in code base...

----------------------------------------------
Gathering Linter rules from repository, or defaulting...

User provided file:[.yaml-lint.yml], setting rules file...
User provided file:[.markdown-lint.yml], setting rules file...
User provided file:[.python-lint], setting rules file...
User provided file:[.ruby-lint.yml], setting rules file...
User provided file:[.coffee-lint.json], setting rules file...
User provided file:[.ansible-lint.yml], setting rules file...
User provided file:[.eslintrc.yml], setting rules file...

---------------------------------------------
Linter Version Info:
---------------------------------------------

---------------------------------------------
[jsonlint]:
WARN! Failed to get version info for:[jsonlint]
---------------------------------------------
---------------------------------------------
[yamllint]:
yamllint 1.20.0
---------------------------------------------
---------------------------------------------
[xmllint]:
xmllint: using libxml version 20910 compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Schemas Schematron Modules Debug Zlib Lzma
---------------------------------------------
---------------------------------------------
[markdownlint]:
0.21.0
---------------------------------------------
---------------------------------------------
[shellcheck]:
ShellCheck - shell script analysis tool version: 0.7.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net
---------------------------------------------
---------------------------------------------
[pylint]:
pylint 2.4.4 astroid 2.3.3 Python 3.8.1 (default, Jan 18 2020, 02:42:17) [GCC 9.2.0]
---------------------------------------------
---------------------------------------------
[perl]:
This is perl 5, version 30, subversion 1 (v5.30.1) built for x86_64-linux-thread-multi Copyright 1987-2019, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
---------------------------------------------
---------------------------------------------
[rubocop]:
0.74.0
---------------------------------------------
---------------------------------------------
[coffeelint]:
2.1.0
---------------------------------------------
---------------------------------------------
[eslint]:
v6.8.0
---------------------------------------------
---------------------------------------------
[standard]:
14.3.1
---------------------------------------------
---------------------------------------------
[ansible-lint]:
ansible-lint 4.1.1a1
---------------------------------------------

----------------------------------------------
----------------------------------------------
Linting YAML files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/local/bin/yamllint]
---------------------------
File:[./.github/workflows/stack-linter.yml]
ERROR! Found errors in [yamllint] linter!
ERROR:[[Errno 2] No such file or directory: './.github/workflows/stack-linter.yml']
---------------------------
File:[./github-handbook/_config.yml]
ERROR! Found errors in [yamllint] linter!
ERROR:[[Errno 2] No such file or directory: './github-handbook/_config.yml']
---------------------------
File:[./github-handbook/docker-compose.yml]
ERROR! Found errors in [yamllint] linter!
ERROR:[[Errno 2] No such file or directory: './github-handbook/docker-compose.yml']

----------------------------------------------
----------------------------------------------
Linting JSON files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/bin/jsonlint]
---------------------------
File:[./docs/services/services_map.json]
ERROR! Found errors in [jsonlint] linter!
ERROR:[internal/fs/utils.js:220
    throw err;
    ^

Error: ENOENT: no such file or directory, open 'docs/services/services_map.json'
    at Object.openSync (fs.js:440:3)
    at Object.readFileSync (fs.js:342:35)
    at main (/usr/lib/node_modules/jsonlint/lib/cli.js:135:23)
    at Object.<anonymous> (/usr/lib/node_modules/jsonlint/lib/cli.js:179:1)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'docs/services/services_map.json'
}]
---------------------------
File:[./github-handbook/stylesheets/fonts/selection.json]
ERROR! Found errors in [jsonlint] linter!
ERROR:[internal/fs/utils.js:220
    throw err;
    ^

Error: ENOENT: no such file or directory, open 'github-handbook/stylesheets/fonts/selection.json'
    at Object.openSync (fs.js:440:3)
    at Object.readFileSync (fs.js:342:35)
    at main (/usr/lib/node_modules/jsonlint/lib/cli.js:135:23)
    at Object.<anonymous> (/usr/lib/node_modules/jsonlint/lib/cli.js:179:1)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'github-handbook/stylesheets/fonts/selection.json'
}]

----------------------------------------------
----------------------------------------------
Linting XML files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/bin/xmllint]

----------------------------------------------
----------------------------------------------
Linting Markdown files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/bin/markdownlint]
---------------------------
File:[./delivered-va-faqs.md]
 - File:[delivered-va-faqs.md] was linted with [markdownlint] successfully
---------------------------
File:[./va-slack-hubot.md]
 - File:[va-slack-hubot.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/cleancutover.md]
 - File:[cleancutover.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/jenkins.md]
 - File:[jenkins.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/full-history.md]
 - File:[full-history.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/requirements.md]
 - File:[requirements.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/resources.md]
 - File:[resources.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/jira.md]
 - File:[jira.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/best-practices.md]
 - File:[best-practices.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/partial-history.md]
 - File:[partial-history.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/rtc-work-item-migration-mappings.md]
 - File:[rtc-work-item-migration-mappings.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/readme.md]
 - File:[readme.md] was linted with [markdownlint] successfully
---------------------------
File:[./RTC]
 - File:[RTC] was linted with [markdownlint] successfully
---------------------------
File:[Migration]
 - File:[Migration] was linted with [markdownlint] successfully
---------------------------
File:[Playbook/lfs.md]
 - File:[lfs.md] was linted with [markdownlint] successfully
---------------------------
File:[./docs/metrics/metrics-from-reports.md]
 - File:[metrics-from-reports.md] was linted with [markdownlint] successfully
---------------------------
File:[./docs/cluster/management-console.md]
 - File:[management-console.md] was linted with [markdownlint] successfully
---------------------------
File:[./docs/cluster/clustering-guide.md]
 - File:[clustering-guide.md] was linted with [markdownlint] successfully
---------------------------
File:[./docs/hardware/storage.md]
 - File:[storage.md] was linted with [markdownlint] successfully
---------------------------
File:[./docs/migrations-recommended-approach.md]
 - File:[migrations-recommended-approach.md] was linted with [markdownlint] successfully
---------------------------
File:[./docs/jenkins/scm-polling-jobs.md]
 - File:[scm-polling-jobs.md] was linted with [markdownlint] successfully
---------------------------
File:[./docs/services/services-overview.md]
 - File:[services-overview.md] was linted with [markdownlint] successfully
---------------------------
File:[./docs/performance-testing-tool/README.md]
 - File:[README.md] was linted with [markdownlint] successfully
---------------------------
File:[./va-migration-report-template.md]
 - File:[va-migration-report-template.md] was linted with [markdownlint] successfully
---------------------------
File:[./README.md]
 - File:[README.md] was linted with [markdownlint] successfully
---------------------------
File:[./CONTRIBUTING.md]
 - File:[CONTRIBUTING.md] was linted with [markdownlint] successfully
---------------------------
File:[./.github/ISSUE_TEMPLATE/generate-training-attendees-list.md]
 - File:[generate-training-attendees-list.md] was linted with [markdownlint] successfully
---------------------------
File:[./.github/ISSUE_TEMPLATE/implementation_weekly_target.md]
 - File:[implementation_weekly_target.md] was linted with [markdownlint] successfully
---------------------------
File:[./.github/ISSUE_TEMPLATE/meeting-notes.md]
 - File:[meeting-notes.md] was linted with [markdownlint] successfully
---------------------------
File:[./issue-templates/change-repo.md]
 - File:[change-repo.md] was linted with [markdownlint] successfully
---------------------------
File:[./issue-templates/create-new-issue-template.md]
 - File:[create-new-issue-template.md] was linted with [markdownlint] successfully
---------------------------
File:[./issue-templates/add-user-to-org.md]
 - File:[add-user-to-org.md] was linted with [markdownlint] successfully
---------------------------
File:[./issue-templates/create-team.md]
 - File:[create-team.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/rtc-migration-discovery/birls-vba-legacy-rtc-discovery.md]
 - File:[birls-vba-legacy-rtc-discovery.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/rtc-migration-discovery/vhie-admin-portal-rtc-migration-discovery.md]
 - File:[vhie-admin-portal-rtc-migration-discovery.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/rtc-migration-discovery/common-security-systems-rtc-migration-discovery.md]
 - File:[common-security-systems-rtc-migration-discovery.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/rtc-migration-discovery/iam-projects-rtc-migration.md]
 - File:[iam-projects-rtc-migration.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/rtc-migration-discovery/adr-rtc-migration-discovery.md]
 - File:[adr-rtc-migration-discovery.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/rtc-migration-discovery/hr-smart-hris-projects-rtc-migration-discovery.md]
 - File:[hr-smart-hris-projects-rtc-migration-discovery.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/bam-rational-usage-20190412.md]
 - File:[bam-rational-usage-20190412.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/rational-migration-kickoff-20190410.md]
 - File:[rational-migration-kickoff-20190410.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/github-rational-demo-20190417.md]
 - File:[github-rational-demo-20190417.md] was linted with [markdownlint] successfully
---------------------------
File:[./meetings/github-rational-demo-20190415.md]
 - File:[github-rational-demo-20190415.md] was linted with [markdownlint] successfully
---------------------------
File:[./training_and_tutorials/elk-setup.md]
 - File:[elk-setup.md] was linted with [markdownlint] successfully
---------------------------
File:[./training_and_tutorials/README.md]
 - File:[README.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/LICENSE.md]
 - File:[LICENSE.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/README.md]
 - File:[README.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/policies/tech-policies/2fa-requirements.md]
 - File:[2fa-requirements.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/policies/tech-policies/security-incidents.md]
 - File:[security-incidents.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/policies/tech-policies/join-va-org.md]
 - File:[join-va-org.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/policies/conduct-policies/code-of-conduct.md]
 - File:[code-of-conduct.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/how-we-work/tools/github.md]
 - File:[github.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/how-we-work/glossary.md]
 - File:[glossary.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/how-we-work/bookmarks.md]
 - File:[bookmarks.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/how-we-work/sensitive-information.md]
 - File:[sensitive-information.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/welcome-to-VA/welcome-letter.md]
 - File:[welcome-letter.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/_pages/getting-help.md]
 - File:[getting-help.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/CONTRIBUTING.md]
 - File:[CONTRIBUTING.md] was linted with [markdownlint] successfully
---------------------------
File:[./github-handbook/nav-tips.md]
 - File:[nav-tips.md] was linted with [markdownlint] successfully
---------------------------
File:[./onboarding/README.md]
 - File:[README.md] was linted with [markdownlint] successfully
---------------------------
File:[./va-teams.md]
 - File:[va-teams.md] was linted with [markdownlint] successfully

----------------------------------------------
----------------------------------------------
Linting Bash files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/bin/shellcheck]

----------------------------------------------
----------------------------------------------
Linting Python files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/local/bin/pylint]

----------------------------------------------
----------------------------------------------
Linting Perl files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/bin/perl]

----------------------------------------------
----------------------------------------------
Linting Ruby files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/bin/rubocop]
---------------------------
File:[./github-handbook/_plugins/jekyll_get.rb]
ERROR! Found errors in [rubocop] linter!
ERROR:[Warning: unrecognized cop Rails found in ction/lib/.automation/.ruby-lint.yml
Error: No such file or directory: /github-handbook/_plugins/jekyll_get.rb
Inspecting 1 file


0 files inspected, no offenses detected]

----------------------------------------------
----------------------------------------------
Linting Coffee files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/bin/coffeelint]

----------------------------------------------
----------------------------------------------
Linting Ansible files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/bin/ansible-lint]
WARN! No Ansible base directory found at:[/ansible]
skipping ansible lint

----------------------------------------------
----------------------------------------------
Linting JavaScript files...
----------------------------------------------
----------------------------------------------

Successfully found binary in system
Location:[/usr/bin/eslint]
Successfully found binary in system
Location:[/usr/bin/standard]
---------------------------
File:[./github-handbook/javascripts/private-eye.js]
 - File:[private-eye.js] was linted with [eslint] successfully
 - Utilizing Env:[--env browser --env es6]
ERROR! Found errors in [js standard] linter!
ERROR:[standard: Use JavaScript Standard Style (https://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
  /tmp/lint/github-handbook/javascripts/private-eye.js:2:10: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/private-eye.js:3:15: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:5:103: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:6:39: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:11:4: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:13:26: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/private-eye.js:13:73: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:13:76: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:14:25: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/private-eye.js:14:59: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:14:62: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:19:24: Unexpected trailing comma.
  /tmp/lint/github-handbook/javascripts/private-eye.js:20:4: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:22:21: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/private-eye.js:23:49: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:24:30: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:25:26: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:26:38: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:29:22: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/private-eye.js:30:20: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:33:43: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:36:14: 'prop' is already defined.
  /tmp/lint/github-handbook/javascripts/private-eye.js:37:27: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:40:27: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:44:18: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:47:28: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/private-eye.js:52:34: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:57:18: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:60:33: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:62:22: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:63:4: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:65:45: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/private-eye.js:66:20: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:68:42: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/private-eye.js:69:20: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:70:21: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:74:33: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:75:28: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:77:24: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:78:46: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:81:76: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:82:35: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:83:56: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:85:53: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/private-eye.js:86:58: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:89:46: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:93:38: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:96:9: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:97:7: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:101:32: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:103:35: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/private-eye.js:105:5: Extra semicolon.]
---------------------------
File:[./github-handbook/javascripts/application.js]
 - File:[application.js] was linted with [eslint] successfully
 - Utilizing Env:[--env browser --env es6]
ERROR! Found errors in [js standard] linter!
ERROR:[standard: Use JavaScript Standard Style (https://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
  /tmp/lint/github-handbook/javascripts/application.js:1:18: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/application.js:2:3: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:2:33: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:5:1: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:5:27: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/application.js:6:13: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:7:3: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:7:28: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/application.js:7:30: Missing space before opening brace.
  /tmp/lint/github-handbook/javascripts/application.js:8:5: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:9:5: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:10:3: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:10:27: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/application.js:10:29: Missing space before opening brace.
  /tmp/lint/github-handbook/javascripts/application.js:11:5: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:12:5: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:27:7: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:27:44: Missing space before opening brace.
  /tmp/lint/github-handbook/javascripts/application.js:28:5: 'numHeadings' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:28:19: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:28:21: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:28:65: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:29:8: There should be no space after this paren.
  /tmp/lint/github-handbook/javascripts/application.js:29:10: 'numHeadings' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:29:26: There should be no space before this paren.
  /tmp/lint/github-handbook/javascripts/application.js:29:28: Block must not be padded by blank lines.
  /tmp/lint/github-handbook/javascripts/application.js:33:11: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:34:11: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:34:17: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:36:11: 'inlineNavigationSelect' is assigned a value but never used.
  /tmp/lint/github-handbook/javascripts/application.js:36:36: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:36:49: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:38:35: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:40:7: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:40:9: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:40:60: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/application.js:41:27: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:50:14: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:50:21: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:51:26: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:54:21: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:54:27: Expected '!==' and instead saw '!='.
  /tmp/lint/github-handbook/javascripts/application.js:57:23: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:57:41: Expected '===' and instead saw '=='.
  /tmp/lint/github-handbook/javascripts/application.js:57:44: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:58:20: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:58:26: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:58:54: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:61:1: Expected indentation of 12 spaces but found 10.
  /tmp/lint/github-handbook/javascripts/application.js:61:18: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:61:32: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:61:37: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:65:19: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:65:25: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:65:44: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:66:18: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:66:32: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:66:37: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:69:21: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:70:39: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:71:39: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:72:39: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:73:39: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:79:13: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:80:11: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:80:18: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:82:36: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:83:9: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:86:10: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:87:9: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:87:17: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:89:7: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:89:51: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:90:11: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:90:13: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:90:73: Missing space before opening brace.
  /tmp/lint/github-handbook/javascripts/application.js:91:9: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:91:11: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:91:83: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:93:9: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:93:11: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:93:67: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:96:5: Block must not be padded by blank lines.
  /tmp/lint/github-handbook/javascripts/application.js:98:3: Block must not be padded by blank lines.
  /tmp/lint/github-handbook/javascripts/application.js:100:3: Expected space or tab after '//' in comment.
  /tmp/lint/github-handbook/javascripts/application.js:101:3: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:101:36: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:102:1: Expected indentation of 4 spaces but found 28.
  /tmp/lint/github-handbook/javascripts/application.js:103:1: Expected indentation of 4 spaces but found 28.
  /tmp/lint/github-handbook/javascripts/application.js:104:1: Expected indentation of 4 spaces but found 28.
  /tmp/lint/github-handbook/javascripts/application.js:104:44: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/application.js:104:47: Missing space before opening brace.
  /tmp/lint/github-handbook/javascripts/application.js:105:1: Expected indentation of 6 spaces but found 22.
  /tmp/lint/github-handbook/javascripts/application.js:105:41: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:106:1: Expected indentation of 6 spaces but found 22.
  /tmp/lint/github-handbook/javascripts/application.js:106:23: Expected space or tab after '//' in comment.
  /tmp/lint/github-handbook/javascripts/application.js:107:1: Expected indentation of 6 spaces but found 22.
  /tmp/lint/github-handbook/javascripts/application.js:107:23: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:107:69: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:109:1: Expected indentation of 6 spaces but found 22.
  /tmp/lint/github-handbook/javascripts/application.js:109:34: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:109:48: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:110:1: Expected indentation of 6 spaces but found 22.
  /tmp/lint/github-handbook/javascripts/application.js:110:23: '$' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:111:1: Expected indentation of 8 spaces but found 26.
  /tmp/lint/github-handbook/javascripts/application.js:111:32: Expected '===' and instead saw '=='.
  /tmp/lint/github-handbook/javascripts/application.js:111:35: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:111:49: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:111:64: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:111:76: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:112:1: Expected indentation of 4 spaces but found 2.
  /tmp/lint/github-handbook/javascripts/application.js:112:6: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:113:3: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:115:55: Missing space before function parentheses.
  /tmp/lint/github-handbook/javascripts/application.js:116:3: 'PrivateEye' is not defined.
  /tmp/lint/github-handbook/javascripts/application.js:117:21: Strings must use singlequote.
  /tmp/lint/github-handbook/javascripts/application.js:150:5: Extra semicolon.
  /tmp/lint/github-handbook/javascripts/application.js:151:10: There should be no space before this paren.
  /tmp/lint/github-handbook/javascripts/application.js:151:11: Extra semicolon.]
---------------------------
File:[./github-handbook/javascripts/jquery-2.1.4.min.js]
 - File:[jquery-2.1.4.min.js] was linted with [eslint] successfully
 - Utilizing Env:[--env browser --env es6]
 - File:[jquery-2.1.4.min.js] was linted with [js standard] successfully

----------------------------------------------
----------------------------------------------
The script has completed
----------------------------------------------
----------------------------------------------
ERRORS FOUND in YAML:[3]
ERRORS FOUND in JSON:[2]
ERRORS FOUND in XML:[0]
ERRORS FOUND IN MD:[0]
ERRORS FOUND in BASH:[0]
ERRORS FOUND in PERL:[0]
ERRORS FOUND in PYTHON:[0]
ERRORS FOUND in COFFEE:[0]
ERRORS FOUND in RUBY:[1]
ERRORS FOUND in ANSIBLE:[0]
ERRORS FOUND in JAVASCRIPT:[2]
----------------------------------------------

Exiting with errors found!
Zacherys-MBP:tmp zkoppert$ !ls
ls .github/linters/.markdown-lint.yml
ls: .github/linters/.markdown-lint.yml: No such file or directory

Stylelint support

Is your feature request related to a problem? Please describe.
super-linter does not support stylelint.

Describe the solution you'd like
Use super-linter to lint styles files.

Describe alternatives you've considered
Running stylelint yourself through custom run steps.

Secretlint support - credential checker

Is your feature request related to a problem? Please describe.
Credential linter is missing in super-linter.

A Scanner for SSH Private key, access token, etc...

Describe the solution you'd like
Secretlint and @secretlint/secretlint-rule-preset-recommend seems like a good addition to the list of linters.
(Its similar implementation of eslint, stylelint #142 )

Describe alternatives you've considered

or GitHub's secret scanning(not public beta yet).

Additional context

Question

Secretlint always scan all file extensions.
Super-Linter has a linter per a language.

Where's the right place to put it? VALIDATE_???

Consume `.eslintrc` instead of defining `.eslintrc.yml`?

Is your feature request related to a problem? Please describe.
Really love the super linter! My concern so far is creating a .github/linters/.eslintrc.yml when .eslintrc already has all of our project's custom rules and configs

Describe the solution you'd like
Just wondering if it'd make sense to preserve a single source of truth by allowing super linter to consume .eslintrc instead of defining the same custom rules in .github/linters/.eslintrc.yml

Describe alternatives you've considered
Maybe a build step script to translate .eslintrc rules into .github/linters/.eslintrc.yml as a temp solution?

Thank you for your consideration!

protolint support

Is your feature request related to a problem? Please describe.
super-linter does not support protolint.

Describe the solution you'd like
Use super-linter to lint Protocol Buffer files.

Describe alternatives you've considered
Running protolint yourself or protolint-action through custom run steps.

Additional context

Package version number shows v1.0

Describe the bug
Package version number shows v1.0 but it should show v2.0

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'github.com/github/super-linter'
  2. Observe the Packages section on the right side bar

Expected behavior
A package labeled v2.0 should be available.

Screenshots
Screen Shot 2020-06-17 at 10 17 08 PM

Additional context
Not sure if the v1.0 package is the latest code so it should just be relabeled or if a new package needs to be created and uploaded. Instructions to do this should also be added to the release instructions in CONTRIBUTING.md.

Add Flags to disable linters

As we add more linters to the super linter, we should have flags to disable or enable only the linters you want to run

  • Something like:
- name: Lint Code Base
    uses: docker://admiralawkbar/super-linter:latest
     env:
        Ansible-lint: disabled 

C++ support

Is your feature request related to a problem? Please describe.

super-linter does not support C++

Describe the solution you'd like

Use super-linter to lint C++ code

Describe alternatives you've considered

Running clang-tidy and clazy yourself through custom run steps

Configuring for non-standard filenames?

Hi there, this is a fantastic project!

We've got a use case where we have a repository that contains a number of JSON files that are named .properties. While I understand it's best practice to have semantically meaningful file extensions, it's what we have for now.

Is it possible to configure jsonlint (and possibly others) to specify file extensions to validate?

Thanks!

Question about linter behavior

Hi @admiralAwkbar and @zkoppert, and other contributors! πŸ‘‹

I just came across this project via https://github.com/github/open-source-releases/issues/129

I haven't used this tool yet (though I think I would like to), but have some questions about the behavior:

  • What does the linter do when it finds problems?
  • Does it fix them and push a new commit?
  • Does it comment on the pull request?
  • Does it run on every commit, or do you somehow "summon" the linter (e.g. with a comment or a label)?

I guess this boils down to me not having a clear idea of whether the term "linting" is about finding issues, or finding AND fixing those issues. πŸ€”

Thanks for any insight. Once I know more, I'd be happy to open a followup PR to make the behavior more clear in the README.

TestCases for TFlint

We need some data for good and bad tests for TFlint

@stoe or @michaelsainz could either of you lend a hand?

under .automation/test/terraform/ there should be good and bad tests

  • good should have tflint run successfully against it
  • bad should have flint complain about something

Configure version of each linter

It would be awesome to be able to configure the version of the linter to be used in linter.yml.

I work on a repo that relies on a specific version of rubocop, and I would love to move all linting to super-linter if support for selecting versions is enabled.

Flake8 support

Is your feature request related to a problem? Please describe.
I prefer flake8 over pylint and would love flake8 support for Python3 linting

Describe the solution you'd like
Flake8 support

Additional context
Documentation here: https://flake8.pycqa.org/en/latest/

Suport `.rubocop.yml` file

Is your feature request related to a problem? Please describe.
The rubocop linter uses the .github/linters/.ruby-lint.yml file.
But is most likely that people will have defined the setting in the default .rubocop.yml

Describe the solution you'd like
We could let the super linter use the default and more standard file, instead of the specific one.

Describe alternatives you've considered
I tried inheriting from the default file like:

inherit_from:
  - ../../.rubocop.yml

But I get:

Linting [RUBY] files...
----------------------------------------------
----------------------------------------------
---------------------------
File:[./spec/support/matchers/json_schema_matcher.rb]
ERROR! Found errors in [rubocop] linter!
ERROR:[Configuration file not found: /action/.rubocop.yml]

I think this is because of file structure inside the linter? Maybe the path would be different to inherit from the file in the root folder, but I'm not sure what would it be.

Also if there is a way to do it, we could put ir in the docs, so people already using .rubocop.yml will quickly get up to speed.

Additional context
This is kind of related to https://github.com/github/super-linter/issues/124 and in general to all the linters.

It is really common for the linters to have a default config file. So it would be nice if super-linter was able to use the default (standard) config files so we don't need to keep linter configuration in multiple places.

Potential Open Source?

Is there a potential future for this as an open source Action on the Marketplace? (I'd love to use this for my open source projects!!)

Limit warning and safety issues

When running the suggested github action you get things like

found 12 vulnerabilities (5 low, 1 moderate, 5 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

and

npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.
npm WARN saveError ENOENT: no such file or directory, open '/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN [email protected] requires a peer of eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 6.x but none is installed. You must install peer dependencies yourself.
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

I would suggest that there is a focus on making sure the output is as lean as possible.

Invoking golangci-lint run on individual files breaks linters in packages.

Describe the bug
When golangci-lint is invoked against a single file, as it is here:

https://github.com/github/super-linter/blob/1e08ff6363cb45c5714b1c30039d896972287173/lib/linter.sh#L1939

This fails to properly lint a package if types are defined in another file.

To Reproduce
Steps to reproduce the behavior:

  1. Create two Go files, main.go and foo.go.
  2. Define Foo in foo.go.
  3. Run golangci-lint run in that package, it lints fine.
  4. Run the super-linter against that package, it fails to lint with: ERROR:[level=warning msg="[runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [/github/workspace/main.go:8:8: undeclared name: Foo]"

See an example run here: https://github.com/RussellRollins/super-lint-error/runs/785695971

Expected behavior
This passes linting without failures.

Screenshots
Screen Shot 2020-06-18 at 3 34 24 PM

Additional context
I can see how the current solution is used to enable the "lint only changed files" feature, but this will fall down for relatively simple Go setups.

npm WARN deprecated packages

Describe the bug
npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.
See occurrence

To Reproduce
Steps to reproduce the behavior:

  1. Run or rerun actions checks
  2. Observe logs

Expected behavior
No unsupported dependencies

Screenshots
Screen Shot 2020-06-16 at 3 29 13 PM

Additional context
This is not affecting functionality. general clean up task.
There may be other similar issues that should be cleaned up if the logs are inspected more thoroughly.

Configure env for standardjs

Right now we have a bunch of standardjs errors in the toolbox as it doesn't recognize Jest, see https://github.com/github/services-toolbox/pull/239/checks?check_run_id=322909780

I added jest to the .eslintrc.yml here: https://github.com/github/services-toolbox/blob/octorepo/.github/linters/.eslintrc.yml#L15,
but standard does not seem to read that file, possibly as it's not in root?

Any ideas @admiralAwkbar?
We could run standard --env jest, but that does not make it configurable.

Support non-master default branches

Is your feature request related to a problem? Please describe.
When setting up the linter to run as a github action, it is looking for the master branch but ours is named main. Fails with error:

Failed to switch to master branch to get files changed!
ERROR:[error: pathspec 'master' did not match any file(s) known to git]

Describe the solution you'd like
An environment variable could be used to input the name of the default branch if it is not named master.

Split up checks into smaller checks for each linter

Currently, this runs as 1 giant check. And that is great except for larger repos will have a very large file to parse. We can utilize the checks API and make each linter its own check and make this sooo much nicer to look at.

Example:

  • Source-Linter
    • bash linter
    • ruby linter
    • etc...

At the end of the Action you will see many smaller jobs inside the main job

SQL Support

we have a lot of SQL in our codebase and would be nice to lint these as well.

not sure which linter would be the best

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.