官术网_书友最值得收藏!

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

主站蜘蛛池模板: 建德市| 桓台县| 宁化县| 固镇县| 大石桥市| 睢宁县| 视频| 蚌埠市| 华亭县| 呼图壁县| 泰兴市| 商水县| 彭阳县| 大埔区| 安龙县| 安国市| 灵寿县| 盐城市| 尚志市| 德昌县| 静宁县| 祥云县| 巧家县| 清丰县| 蛟河市| 江西省| 奉新县| 绿春县| 红原县| 龙南县| 霍林郭勒市| 湖州市| 科技| 灌南县| 武定县| 平泉县| 稻城县| 晋中市| 云南省| 沁水县| 青岛市|