Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use IDEA

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to use IDEA". In daily operation, I believe many people have doubts about how to use IDEA. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to use IDEA"! Next, please follow the editor to study!

1. Goal

Idea integrates sonar's code review, and the implementation can check your code before committing it, rather than after committing it.

Sonar can detect code quality from the following seven dimensions, and as a developer, you need to deal with at least the first five code quality issues.

Do not follow the code standard sonar can use PMD,CheckStyle,Findbugs and other code rule detection tools to standardize code writing

Potential defects sonar can detect potential defects through code rule detection tools such as PMD,CheckStyle,Findbugs

Poor complexity distribution files, classes, methods, etc., will be difficult to change if the complexity is too high, which will make it difficult for developers to understand them, and without automated unit testing, changes to any component in the program may lead to the need for comprehensive regression testing

Repetition obviously the code that contains a lot of copy and paste in the program is of poor quality, and sonar can show serious repetition in the source code.

Insufficient comments or too many comments will make the code less readable, especially when there are inevitable personnel changes, the readability of the program will be greatly reduced, and too many comments will cause developers to spend too much energy on reading comments, which is also contrary to the original intention.

Lack of unit test sonar makes it easy to count and display unit test coverage

Bad designs can find loops through sonar, show the interdependencies between packages and classes, detect custom architecture rules, manage third-party jar packages through sonar, and use LCOM4 to detect the application of individual task rules and detect coupling.

2. Premise

Sonarqube has been set up.

Jdk8 environment (mine is jdk7, no problem running)

3. Install the plug-in

Set up-- > find the sonarLint plug-in in Plugins and install it. Restart IDEA after the installation is complete.

4. Configure item 1) configure the server

Here is a pop-up window opened in editing form. When I add it for the first time, I need to add my own sonar platform address, which is usually built within the company.

2) Select a project

After configuring the server information above, you will get the corresponding project information, as follows:

After the configuration is completed, you can see the sonar extension in the lower left corner of idea in the current project environment:

At this point, the study on "how to use IDEA" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report