Go to the social security center on the day of hospitalization o
bus line: metro line 15, the whole journey is about 15.0km
1. Walk about 1.1km from Wukou to Xikou station of Qinghua East Road
2. Take Metro Line 15, after 9 stops, to Wangjing east station
3. Walk about 700m to xinhuicheng shopping center
PMD it is a java source code analyzer based on static rule set, which can identify the following potential problems:
- possible bug - empty try / catch / finally / switch block
– dead code: useless local variables, method parameters, and private methods
– empty if / while statement
– overly complex expression - unnecessary if statement. You could have used the while loop, but you used the for loop
– code that can be optimized: the use of string / StringBuffer that wastes performance
findbugs is used to find bugs in Java code. It uses static analysis to identify hundreds of potential different types of errors in Java programs
checkstyle it defines a series of available moles, each of which provides a strict (mandatory, optional...) configurable checking rule. Rules can trigger notification, warning and error
now there are many ways to view the processing results of these tools:
XML format: these tools can generate XML files, which can be used to generate HTML reports or browse analysis results by other tools
HTML format: HTML format is the most popular way to generate reports and share them among teams. You can also create your own reports with an XSL form
ide plug-ins: almost all named ides provide plug-ins for these tools, which makes it possible to find all problems in the source code
one of the problems with code quality tools is that they sometimes prompt developers with a lot of errors that are not errors - also known as false positives. When this happens, developers can learn to ignore the output information of the tool, or discard all the output information
in order to make better use of the output of these tools and give developers a more useful view, it is better to have a way to focus only on what we want. In this article, we'll find other interesting ways to make better use of the output of all these well-known Java static analysis tools, and then query the results like a database
jarchitect and cqlinq
jarchitect is another static analysis tool, which makes up for other tools. It uses a code query language based on LINQ (cqlinq) to query code like a database
The previous versions of
jarchitect 3 can only query the analysis data extracted from jarchitect, but starting from jarchitect 4, you can include the output results of many other static analysis tools, and then use cqlinq to query
let's take the source code of PDT core (eclipse's PHP plug-in) as an example to illustrate how to make good use of the analysis results of these static tools in jarchitect
before querying the analysis results, the following steps should be followed:
the first step:
use PMD, CPD, findbugs and checkstyle to analyze the project and generate the XML file containing the analysis results
Step 2:
analyze the project with jarchitect
Step 3:
in jarchitect, click the menu "plugins" - & gt“ Import plugins result files to import all XML files into jarchitect
jarchitect provides many useful queries for these tools by default, and these queries can be easily customized
query:
select * from user_ constraints where table_ name=' Your watch name
method of deleting constraint:
alter table t drop primary key cascade --- delete primary key
alter table t drop unique (colname) -- delete unique constraint on colname