In this tutorial, you will learn how to add a code quality check to your pull requests, using a service called Embold.io. Adding a tool to provide automatic static code analysis within your projects will help you to level up the quality of your code. Instead of having to manually check code, you can use a tool to do it for you. The good thing about Embold is that it is free for small projects. Embolds price is based on the number of lines of code within your project and its type. Your allowed more lines of code for public solutions compared to private repositories. If your repository is private, the free service is free as long as your total lines of code are under 20 thousand lines. For public repositories, you get a limit of 1 million lines of code 🔥🔥🔥. Meaning, the more lines of code your project contains, the more expensive it will be. In the free service, Embold will scan your code up to 5 times a day. If you work on small projects, as it's free and fairly pain-free to set up I cant see a good reason not to use it! If you want to level up your code quality, read on 💥

Hooking Up Embold With Your Project

Hooking up Embold with your project is simple and can be done within the Embold portal without any code changes. As you can see below, enabling a quality check on your project, takes seconds:

Add A Quality Gate To Your JavaScript Powered Website - 1

The scan will only take a few minutes to complete. Afterwards, you will see a dashboard, that gives your codebase a rating. Clicking on your project will allow you to see the issues the tool found. If you are using Ember within a NextJS application, Embold automatically searches all the code within the out/_next directory. This means that on the first scan expect to see a pretty bad score.

Add A Quality Gate To Your JavaScript Powered Website - 2

To fix this you will need to add a file called embold.yaml within the root of your project. In this file, you can add directories to exclude from the search. An example, of how this file will look can be seen below:

After configuring the exclude folder, things should look a lot more healthy:

Add A Quality Gate To Your JavaScript Powered Website - 3

You can see an example of this config from this repository here. Happy Coding 🤘