android - 在 Sonar 分析中包含 xml 文件(Android 项目)

标签 android xml plugins code-analysis sonarqube

我刚刚配置了Sonar分析我的 android 项目,但意识到默认情况下只分析 Java 文件。

有没有一种(简单的)方法可以在分析中包含 xml 资源? 我在他们的项目页面中找不到 Sonar 的插件,但也许那里有什么东西?!

最佳答案

Sonar 提供了一个 XML 插件: http://docs.codehaus.org/display/SONAR/XML+Plugin

Any XML file can be validated with this plugin. The plugin provides static code analysis of XML files within Sonar. Typical use cases are validation of files for coding or usability standards.

The following functionality is provided:

XML validation
XML schema validation Configurable rules using XPath
sizing (files, lines of code)

The XML validation is available out-of-the box. The configurable XPath rules requires some knowledge of XPath.

The plugin scans the following files by default: .xml, .xhtml. The file extensions and the file inclusion patterns are configurable.

The plugin imports the XML files in Sonar, and performs the validations. The checks are configurable in the Sonar rules repository.

关于android - 在 Sonar 分析中包含 xml 文件(Android 项目),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5685206/

相关文章:

java - 保存LinearLayout与多个TextView。安卓

android - 新的 Android Studio Activity 设计模式 content_main.xml

c# - 在XML中,带问号的节点叫什么,在C#中如何添加?

plugins - Dynamics CRM - 在用户登录时注册一个插件

python - sublime text 2 扩展中的用户输入

java - 类 java.util.ArrayList 具有泛型类型参数,请使用 GenericTypeIndicator 代替

java - 使用公司品牌名称命名类和资源

xml - XPATH:在文档中的任何位置查找一段文本

python - 在 phonegap 应用程序中捆绑 python "back end"代码

android - 无法从未提升的透明 FloatingActionButton 中删除 "shadow"