GitHub is introducing a new linter that can handle all types of code. The GitHub Super Linter was built by the GitHub services team to maintain consistency in GitHub’s documentation and code while making communication and collaboration across the company a more productive experience.

The Super Linter prevents broken code from being uploaded to master branches, helps establish coding best practices across multiple languages, and builds guidelines for code layout and format. 

“With these basic criteria, we should be shipping better, cleaner, and more stable code internally and to our customers and partners,” GitHub wrote in a blog post.

Since it is a source code repository that is packaged into a Docker container, any repository on GitHub.com can call the Super Linter and start utilizing its benefits. 

Any time a pull request is opened, it will start linting the code case and return via the Status API. This then allows the developer to go back to their branch, fix any issues, and create a new push to the open pull request. At that point, the Super Linter will run again and validate the updated code and repeat the process, according to GitHub. 

Branch protection rules can be configured to make sure all code must pass before being able to merge as an additional measure.

The tool can also be helpful for any repository where multiple types of code and/or documentation all live together (monorepo).

The tool also contains customizations with flags and templates to help customize the Super Linter to an individual repository. 

“The beauty of this is, out of the box you will start establishing the framework, and your team can decide at any point, if additional customization is needed, you have all the ability to do so,” GitHub stated. 

Additional details are available here.