您的位置:首页 > 移动开发 > Android开发

Jenkins+ Gradle +Lint对Android工程源码进行静态代码分析

2017-01-18 22:34 447 查看
http://blog.csdn.net/hwhua1986/article/details/50067089
http://blog.csdn.net/hwhua1986/article/details/50067089 http://blog.csdn.net/hwhua1986/article/details/50067089 




Jenkins+ Gradle +Lint对Android工程源码进行静态代码分析

标签: AndroidLint
2015-11-27 10:31 1568人阅读 评论(0) 收藏 举报


 分类:

Jenkins(32) 

 Lint Gradle(9) 


版权声明:本文为博主原创文章,未经博主允许不得转载。

目录(?)[+]

转载请注意出处:http://blog.csdn.net/hwhua1986/article/details/50067089


 Lint的介绍

       官网介绍:

The Android linttool is a static code analysis tool that checks your
Android project sourcefiles for potential bugs and optimization improvements for correctness,security, performance, usability, accessibility, and internationalization.

Android线头工具是一个静态代码分析工具,检查你的Android项目源文件为潜在的bug和优化改进正确性,安全性、性能、可用性、可访问性和国际化。

       静态检查原理:



Figure 1 shows how the 
lint
 tool processes the application source files.



Figure 1. Code scanning workflow with the
lint
 tool
Application source filesThe source files consist of files that make up your Android project, including Java and XML files, icons, and ProGuard configuration files.The 
lint.xml
 file
A configuration file that you can use to specify any 
lint
 checks that you want to exclude and to customize problem severity levels.The 
lint
 tool
A static code scanning tool that you can run on your Android project from the command-line or from Eclipse. The
lint
 tool checks for structural code problems that could affect the quality and performance of your Android application. It is strongly
recommended that you correct any errors that
lint
 detects before publishing your application.Results of 
lint
 checking
You can view the results from 
lint
 in the console or in the Lint Warnings view in Eclipse. Each issue is identified by the location in the source files where it occurred and a description of the issue.  

 Jenkins配置如下:

新建job



配置svn



配置构建操作



配置分析报告生成步骤

 


5.4.3 构建结果查看

点击报告



报告详细列表



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: