Our Approach to Code Quality in Scala


Code Quality. This term has become quite a rage in the industry with more and more companies devoting more time (and money) to give a better code quality to their clients.

But why ?  Following are some of the reasons

1) Ensures an easy to read code. Yes it does that. And hence the reader does not need to pull his/her hair out(quiet literally) to understand the code.

2) Makes the code maintenance an easy task.

3) Quality code is easy to reuse.

4) Testability. A well tested code does save from sins of omission and commissions and hence ensuring you have everything that is needed.

We at Knoldus pay a lot of attention to the quality of code that we write for various projects that we have. Providing good code quality to our clients is one of our primary promise.

And that we deliver !

For one of our project the statistics that CodeSquad generated is below:

fitfyles

 

fitfyles2

 

To ensure that we have a timely insight of all the projects, we are now also developing an application, which we call CodeSquad, that displays the real time status of all the important quality parameters for all the projects.

The plugins that we integrate with all our projects are

1) ScalaStyle

Helps to indicate the potential problems with the code. We target 0 warnings in any of our project.

2) Scapegoat

Helps to indicate suspicious language usage in the code. We target 0 warnings, 0 errors and 0 infos in any of our project.

3) Scoverage

Helps to indicate the statement and the branch coverage of the code. The Knoldus promise is that we deliver codes that have 90% of code coverage.

4) Copy Paste Detector

Helps to identify files and places where copy paste has occurred. Copy pasting is not a good coding style and we keep it to the minimum and encourage 0 copy pastes.

With CodeSquad now in place we have ensured that every project is using the latest versions of plugins, sbt and Scala. It continuously scrolls through the quality reports of the project and their respective modules.

Also, for this particular application we are using ScalaJS, ScalaTags and ScalaCss to build our front-end pages. To know more about ScalaJs you may refer to one of our blog.

We are working on adding more features and functionalities to CodeSquad and then we will approach the entire community with this as our product. Also if anyone wants to try its beta version as of now for free can write to us sonu.mehrotra@knoldus.in and we will be glad to use it for you. Any feedback or suggestions are also welcome.

Happy Coding !!

This entry was posted in Scala. Bookmark the permalink.

3 Responses to Our Approach to Code Quality in Scala

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s