In the future development of the project, you can use the appropriate tools to check the program:
1、FindBugs:
A static analysis tool that examines a class or
JAR
file, comparing the bytecode to a set of defect patterns for possible problems
– Most of the problems found by
FindBugs are in the
Runtime process, which will cause program exceptions and errors
–
FindBugs
can contact the context of the package where the
class
is located, perform penetration inspection on the code, and alert on hidden deeper logic errors, resource operation problems, etc.
–
Of course,
FindBugs
can be integrated into the
Eclipse
development environment as well as into
Maven
to generate reports
2、CheckStryle
At present, the most widely used code inspection tool, code format inspection tool, can build customized code specification templates
The code specification template can be customized, allowing developers to specify their own code, and can also be used as a standard to measure the quality of the code.
3. Metrics counts the number of code classes, interfaces, methods, lines of code, etc.