The use of the alibaba code specification tool plug-in in MyEclipse and eclipse

Environment requirements: jdk1.8, (whether version 1.8 or lower is supported, not yet tested, it is estimated not to be supported) Help -> Install New Software, click add in the pop-up box, name it casually, and enter the Update Site address: https://p3c. alibaba.com/plugin/eclipse/update press Enter, then check Ali-CodeAnalysis, and then keep clicking Next Next... Just follow the prompts and go on. Then it is prompted to restart, the installation is complete. At present, the plug-in implements 53 rules in the development manual, most of which are implemented based on PMD, among which 4 rules are implemented based on Eclipse and support the QuickFix function of 4 rules.

  • All overriding methods must be annotated with @Override,
  • Spaces must be added between reserved words such as if/for/while/switch/do and the left and right parentheses.
  • When initializing a long or Long, an uppercase L must be used, not a lowercase l)
  • Object's equals method is prone to throwing null pointer exceptions. You should use constants or objects with certain values ​​to call equals.

At present, real-time code detection is not supported, and it needs to be triggered manually. I hope more people will join in to make our plug-ins better and better, and try to improve the experience of R&D. Code scanning: You can manually trigger code detection through the right-click menu and the Toolbar button. At the same time, some rules that implement the QuickFix function can be quickly repaired in the result panel. Trigger scan: Right-click in the currently edited file to trigger the detection of the file in the pop-up menu (right-click on the group code specification).

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324932124&siteId=291194637