Our Approach to Code Quality in Scala

Table of contents
Reading Time: 2 minutes

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:

Code Quality




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 !!

Written by 

Sonu Mehrotra is a Software Developer with industry experience of 5+ years. He is a Clean Code practitioner and an Agile follower. Sonu has helped financial institutions develop trading systems that make trading activities easier and more accessible to customers.

3 thoughts on “Our Approach to Code Quality in Scala2 min read

Comments are closed.