Javascript Code Review Tool
Some details in code review are repetitive at times, such as: “always use strict equal in JS”, “Function unused”. So, what about to automating these things with a great tool?
Step 1: Signing in Hound CI
Hound CI is a hosted service that reviews GitHub pull requests for Ruby, JavaScript, CoffeeScript, and SCSS style guide violations.
Go to https://houndci.com/ and Sign In with your Github account:
This gonna open your repository list. I created a hound-ci-tutorial, you can choose whatever you want. So, choose a repository and activate it:
Step 2: Open Pull-Request
To test, I will create a pull-request in the repository have chosen with some JS file and view the hound CI standards validations.
Step 3: Custom Configuration
This is the default JS setting Hound CI. You can see the default version here. Let’s create a custom validator. In your repository create a file called .javascript-style.json with this code:
|
|
We copy the default version and added this eqnull line. After that, create .hound.yml file in your repository with this code:
|
|
You can create a test file, this will raise eqnull error:
|
|
So you can see the result:
Conclusion
You can take a look and see the other features available not only for javascript, but for css, ruby, python. It’s a fantastic tool.