Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Code Climate: A Service for Static Analysis

DZone's Guide to

Code Climate: A Service for Static Analysis

Today, we'll talk about a code-related but less-known GitHub integration: Code Climate, a service for static analysis.

· Agile Zone ·
Free Resource

You've been hearing a lot about agile software development, get started with the eBook: Agile Product Development from 321 Gang

GitHub has been a revolution for developers. You could consider SourceForge a predecessor, in the sense that it also let people share code. But GitHub is not simply a place where you can download programs — it's mainly a platform for developers. One thing that GitHub has brought with it is integrations, of which there are many. The most famous is probably Travis and, of course, there are many other services for continuous integration. There are also other integrations, such as the ones with messaging apps, which are useful, but less obvious. Today, we'll talk about a code-related but less-known one: Code Climate, a service for static analysis.

Static Analysis as a Service

We have mentioned static analysis when we talked about Roslyn, but this service delivers it — although it doesn't cover C#, which should probably be a crime. Following the lead of GitHub, it's also free for open-source use, but it costs for businesses. This is a successful model that is also followed by Travis and AppVeyor, which have become synonymous with CI on Linux and Windows, and, among other things, Walkmod, another tool that can modify your code to your liking.

You can hook the service to your pull requests, but there is also a local version that uses a Docker image of the CodeClimate CLI — which is great if you don't want to wait for pushes to check your code. You can easily integrate the JSON output can be with other tools you use. On the other hand, if you find a use for such a service, you don't really want to manage it yourself. And you really want to check the code of everybody, and not just your own. After all, they created it for GitHub, where developers work together.

It Seems to Hate JavaScript Developers

The service itself seems to rely on libraries developed by other people. There is nothing wrong per se in that; of course, there is tremendous value in offering a service. And leveraging the works of everybody allows them to check for everything, like bugs, security risks, excessive complexity, style, linter, etc., and basically everything you can imagine. They can also check Chef cookbooks and bash scripts. People who have a not-developed-here attitude can't do that; though the drawback is that there is a lack of uniformity in analysis and judgment between different languages. If you look at their Open Source Section, it seems that every JavaScript project is judged harshly (Bootstrap, jQuery, node, etc.). Of course, I haven't checked everything, but the only one that seems to be good is D3. While if you look at Ruby instead, and at Jekyll or Rails...

It may be that JavaScript developers are all terrible, but that seems unlikely; more probably, there are differences in the tools that focus on JavaScript and other kinds of languages. There might be legitimate concerns, maybe because JavaScript is used in a different way. Rules exist to help you create good software, but if the best programmer ignored them, are they actually good rules? Are they rules that can be followed without killing productivity? While this is a great way to humble everybody, the risk is that many warnings will soon become ignored warnings. After all, if everything sucks, why bother? We all know the story of the boy who cried Wolf. You have to be careful and take your time to configure it in a way that works for your project.

Conclusion

If you are searching for a tool to verify the quality of your code, you might want to use CodeClimate, especially if you are working on open source software with many other people. Although, if you use JavaScript, be aware that it might tell you that everything you do is wrong.

Download the free agile tools checklist from 321 Gang. This guide will help you choose the right agile tools to position your team for success. 

Topics:
static analysis ,javascript ,agile ,quality code

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}