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

Save your reputation, eliminate non-Java bugs

DZone's Guide to

Save your reputation, eliminate non-Java bugs

· Java Zone
Free Resource

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

Recently, when we talked about Static Code Analysis, I made a promise to come back with some more examples on how to find bugs automatically in non-Java code. We've seen already how static code analysis engines parse your code into an Abstract Syntax Tree (AST) and then search for known bug patterns in that AST. They can help you either on-demand to provide an interactive colorful report, or on-the-fly, while you edit the code, shape it, refactor and polish.

A natural demand once you get addicted to having your code inspected automatically is to obtain the same assistance outside of the Java code.

I don't know your exact situation, but chances are high that a great deal of the code on your Java projects these days is written in other languages. Think of all the JavaScript code out there, XML documents, HTML pages, SQL or HQL queries, CSS definitions or plain property files, not mentioning the increasing number of Groovy, Ruby and Scala files. Or Clojure anyone?

What a limitation it would be for a tool if it ignored such a large portion of your code-base and let you suffer without any help!

In IntelliJ IDEA, a great deal of the bug patterns in the database target non-Java languages.

So you can search for bugs in JavaScript,

tune your HTML,

fix CSS,

 

improve Hibernate queries

or type Groovy without fear.


The list of supported technologies obviously doesn't end here, but you've seen enough to get an idea. Being able to spot such problems in code can be virtually a life-saver.

The last important point to mention here. You might have noticed that Static Code Analysis in non-Java code feels exactly the same as in Java code. Same markers, behavior and keyboard shortcuts. Don't waste time learning the tool, just straight use it.

 

Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}