gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 22:26:47 25 4
gpt4 key购买 nike

我刚刚配置了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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com