Posted by Romain GAUTIER in HowTos & Tutorials on December 10, 2012 with Comments Off
Javascript is widely used in web projects. The language is very easy to use but harder to master which leads, unfortunatly, to misusage from many developers. Scertify allows Javascript developers to quickly improve the quality of their code, by checking over 400 rules “on the fly” directly from Eclipse. For this reason, using Scertify during code sessions in Javascript is a strong asset.
In this video article we focus on the use of Scertify in the context of JavaScript development, we will write a small script which aims at providing autocompletion for an input field. We will only use Scertify plugin for eclipse, develop the script in live and review the improvement Scertify provides us.
Even for such a small script we took advantage of several rules improving the global readability, the performance and the code convention compliance. Let us review the different violations we dealt with:
| Short name | Criticity | Type | Explanation |
| Expected a at column x | BLOCKER | Readability | Help you to indent correctly your code. Very important one. |
| Use “===” instead of “==” | BLOCKER | Performance | Avoid type coersion before comparing. Improves the performance and prevent from tricky errors. |
| Expected exactly one space | MAJOR | Code convention | Encountered between function keyword and list argument essentially. |
| Missing use strict | MAJOR | Code convention | Using strict mode is a good habit. |
| Unexpected space | CRITICAL | Code convention | Good to highlight unnecessary space, especially « invisible » ones at the end of the lines. |
That’s how Scertify helps you to produce quality code. Scertify provides about 400 rules for Javascript developers!
Comments are closed.