Reseller News

GitHub’s Super Linter is ‘one linter to rule them all’

Super Linter is a GitHub Action that lets you automate linting for any GitHub repo, supporting some 20 programming languages

GitHub has introduced the Super Linter, a GitHub Action that offers a combination of various linters to help validate source code.

By setting up a GitHub repository to call the Super Linter action, developers can have Super Linter automatically lint their code whenever they open a pull request.

Super Linter was built by the GitHub Services Devops Engineering team to maintain consistency in documentation and code while making collaboration across the company more productive. Described as “one linter to rule them all,” the Super Linter is a GitHub repo that is packaged in a Docker container and called by GitHub Actions. Thus any repo on GitHub can call Super Linter and leverage its benefits.

Super Linter offers the following benefits:

  • Prevents uploading of broken code to master branches
  • Establishes coding best practices across different languages
  • Sets build guidelines for code formatting and layout
  • Helps streamline code reviews
  • Provides for cleaner and more stable code

Some of the languages and linters supported by Super Linter:

The full list of supported linters can be found on GitHub.

Developers can use Super Linter by adding it to their GitHub Actions workflow. When developers have set up their repo to support the Super Linter action, any time a pull request is opened, linting of the code base starts and returns via the Status API. Developers will be informed if code changes passed successfully or if errors were detected and where the errors occurred.