- Learning Continuous Integration with Jenkins(Second Edition)
- Nikhil Pathania
- 236字
- 2021-07-02 21:18:32
Static code analysis
Static code analysis, also commonly called white-box testing, is a form of software testing that looks for the structural qualities of the code. For example, it answers how robust or maintainable the code is. Static code analysis is performed without actually executing programs. It is different from the functional testing, which looks into the functional aspects of software, and is dynamics.
Static code analysis is the evaluation of software's inner structures. For example, is there a piece of code used repetitively? Does the code contain lots of commented lines? How complex is the code? Using the metrics defined by a user, an analysis report is generated that shows the code quality regarding maintainability. It doesn't question the code's functionality.
Some of the static code analysis tools like SonarQube come with a dashboard, which shows various metrics and statistics of each run. Usually, as part of CI, the static code analysis is triggered every time a build runs. As discussed in the previous sections, static code analysis can also be included before a developer tries to check-in his code. Hence, a code of low quality can be prevented right at the initial stage.
They support many languages, such as Java, C/C++, Objective-C, C#, PHP, Flex, Groovy, JavaScript, Python, PL/SQL, COBOL, and so on. The following screenshots illustrate the static code analysis report using SonarQube:
Static code analysis report
Static code analysis report
- pcDuino開發實戰
- 操作系統實用教程(Linux版)
- Containerization with LXC
- 混沌工程:復雜系統韌性實現之道
- Linux操作系統應用編程
- Windows Phone 8 Application Development Essentials
- Linux運維最佳實踐
- Windows 7中文版從入門到精通(修訂版)
- 網絡操作系統教程:Windows Server 2016管理與配置
- Windows 7實戰從入門到精通(超值版)
- Linux網絡操作系統項目教程(RHEL 7.4/CentOS 7.4)(第3版)(微課版)
- 鴻蒙HarmonyOS手機應用開發實戰
- 嵌入式微系統
- 程序員必讀經典(算法基礎+計算機系統)
- Windows7系統維護百寶箱