GitHub Super Linter Helps Developers Ensure No Broken Code Is Ever Merged

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Source:-infoq.com

GitHub Super Linter aims to automate the process of setting up your GitHub repositories so they will use the appropriate linter for your language whenever a pull request is created.

According to GitHub, its Super Linter will make it easier for developers to ensure broken code never makes it into their master branches. When using Super Linter,

any time you open a pull request, it will start linting the code case and return via the Status API. It will let you know if any of your code changes passed successfully, or if any errors were detected, where they are, and what they are.

After fixing all detected issues, the developer can update the pull request and if Super Linter finds no additional issues, the pull request will be created.

GitHub Super Linter basically takes care of configuring GitHub repositories to run a GitHub Action for each new pull request. It packages a number of previously available open source linters into a Docker container that is called by GitHub Actions. Super Linter supports many languages, including JavaScript, Python3, Perl, TypeScript, Golang, and many others.

To better suit Super Linter to your organization’s guidelines, you can provide template rule files for the linters you use by copying them into .github/linters. If no custom rule files are provided, Super Linter will use its own default rule files. Similarly, Super Linter allows you to disable specific linters and rules to ignore certain errors or warnings.

Super Linter also includes many customization options that can be set using environment variables. For example, setting VALIDATE_ALL_CODEBASE to true will cause all files to be linted, as opposed to only new and modified files. A number of flags allow you to enable or disable linting on a language-by-language basis.

According to GitHub, Super Linter will help establish sound coding practices across languages and will make collaboration more effective by reducing the amount of work spent on pull requests.

GitHub competitor GitLab also supports a feature similar to GitHub Super Linter through its Code Quality component. GitLab relies on CodeClimate engines to provide automated code review before merging to master. GitLab’s solution does not support as many languages as Super Linter, but GitLab said they are working to extend language support in Code Quality.

As a final note, GitHub Super Linter may be seen as another step in the direction of moving your entire IDE to the Cloud. In the same line, a few months ago GitHub introduced GitHub Codespaces, which provide a fully-configured Visual Studio Code-based environment inside of GitHub.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x