天天看點

Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析

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+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析

  分類: Jenkins(32) 

Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析

  Lint  Gradle(9) 

Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析

版權聲明:本文為部落客原創文章,未經部落客允許不得轉載。

目錄(?)[+]

轉載請注意出處: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.

Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析

Figure 1. Code scanning workflow with the

lint

 tool

Application source files
The 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
Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析
配置svn
Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析
配置建構操作
Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析
配置分析報告生成步驟
Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析

5.4.3 建構結果檢視

點選報告
Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析
報告詳細清單
Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析 Jenkins+ Gradle +Lint對Android工程源碼進行靜态代碼分析

繼續閱讀