问题
I am using Sonar to analyse our Java code in a very large project. We mostly use Hibernate, but there are also a lot of plain SQL queries in our code. Is it possible to analyse those SQL queries by Sonar? I noticed there is a plugin for at least something similar, but I am unsure whether it fits my needs here. Some of our queries cause headaches, so it would be convenient if Sonar could notify of SQL anti-patterns.
回答1:
There is a commercial PL/SQL plugin, but its designed to analyse Oracle files.
Not aware of any Sonar tool which analyzes SQL strings, embedded within Java programs.
回答2:
A commercial TSQL option is http://www.techcognia.com/Home.aspx
Don't know of any free/open source version for Microsoft SQL.
来源:https://stackoverflow.com/questions/13533744/possible-to-analyse-sql-queries-in-sonar