How to Control & Correct “On ...

TextAreaCodeJS_large

How to Control & Correct “On the Fly” Javascript Violations in Eclipse

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.

Tutorial: How to continuously improve your Javascript code with Scertify

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.

Review of encountered violations

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.

Conclusion

That’s how Scertify helps you to produce quality code. Scertify provides about 400 rules for Javascript developers!

 
 

Posted by
Romain GAUTIER (See other posts)

Romain is Software Engineer at Tocea.

Tags: , ,

Comments are closed.

Your cart

  • No products in the cart.
Scertify™ is a suite of tools dedicated to development teams, designed to continuously track and eliminate software-related risks, through code quality & architecture compliance monitoring associated with computer-aided refactoring capabilities.
» Get your trial version!

Who we are?

Tocea provides Development Teams with innovative solutions enabling them to continuously control and improve the quality and integrity of their applications. We support developers, architects and project managers in their permanent effort to tackle IT debt and costs, by providing them with unique information on Code & Architecture Quality and some exclusive computer-aided refactoring features.

LoadingRetrieving latest tweet...

Back to Top

2013 © All rights reserved. Tocea SA. Legal Notice