In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Sonar is an open source platform for code quality management to manage the quality of source code
In the form of plug-ins, you can support code quality management and testing in more than 20 programming languages, including java,C#,C/C++,PL/SQL,Cobol,JavaScrip,Groovy
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.
1. Do not follow code standards
Sonar can standardize code writing through code rule detection tools such as PMD,CheckStyle,Findbugs.
two。 Potential defects
Sonar can detect potential defects through code rule detection tools such as PMD,CheckStyle,Findbugs
3. 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
4. Repetition
Obviously, the quality of the code that contains a lot of copy and paste in the program is poor, and sonar can show serious repetition in the source code.
5. Insufficient or excessive comments
The lack of comments will worsen the readability of the code, especially when there are inevitable personnel changes, the readability of the program will be greatly reduced.
On the other hand, too many comments will cause developers to spend too much energy on reading comments, which is also against the original intention.
6. Lack of unit testing
Sonar can easily count and display unit test coverage.
7. Bad design.
Through sonar, you can find loops, show the interdependencies between packages and classes, and detect custom schema rules.
Third-party jar packets can be managed through sonar, and LCOM4 can be used to detect the application of individual task rules and detect coupling.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.