- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的项目有以下应用 bulild.gradle。当我运行命令 gradle check 时,app/build/ 文件夹中没有报告任何输出。我基本上对以前的项目使用了相同的代码,它似乎工作得很好。
apply plugin: 'com.android.application'
apply plugin: "findbugs"
apply plugin: 'pmd'
apply plugin: "jdepend"
apply plugin: 'checkstyle'
findbugs {
ignoreFailures = false
effort = "max"
reportLevel = "low"
}
pmd {
ignoreFailures = true
}
jdepend{
ignoreFailures = true
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
tasks.withType(Checkstyle) {
reports {
xml.enabled false
html.enabled true
html.stylesheet resources.text.fromFile('config/xsl/checkstyle-custom.xsl')
}
}
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "dat255.refugeeevent"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.google.android.gms:play-services:9.6.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.google.code.gson:gson:2.7'
testCompile 'junit:junit:4.12'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile files ('libs/microsoft-translator-java-api-0.6.2-jar-with-dependencies.jar')
}
最佳答案
查看 gradle fury 的质量插件,适用于 android 和非 android 项目 https://github.com/gradle-fury/gradle-fury .我们使用它有一些强制报告站点的插件。它主要基于其他人的工作,并进行了大量调整,使其在 Android 和非 Android 项目中都能正常工作。
应用它
所有项目{
申请自:“https://raw.githubusercontent.com/gradle-fury/gradle-fury/master/gradle/quality.gradle”
}
然后你需要这里的内容:https://github.com/gradle-fury/gradle-fury/tree/master/config克隆到你的仓库中。只需 config 文件夹,其余内容不需要。
最后,要么调用任何需要检查的 gradle 任务。所以以下任何一项都可以解决问题
gradlew 构建
gradlew 检查
gradlew install
(如果你正在运行来自 fury 的 maven 支持)关于android - Gradle 插件(findbugs、pmd、jdepend、checkstyle)不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40004876/
我的 build.gradle 中有 PMD 检查,如下所示: apply plugin: "pmd" dependencies { pmd "net.sourceforge.pmd:pmd-ja
我正在阅读一个有趣的教程:http://www.avajava.com/tutorials/lessons/how-do-i-generate-pmd-and-cpd-reports-for-a-si
我想知道是否有办法从命令行运行所有 PMD 规则集。 我使用了与 Eclipse IDE 和 Maven 集成的 PMD。但现在我需要从 CLI 运行它。 我已经检查过这个页面 http://pmd.
我正在修改我的应用程序代码以遵守 pmd 规则。我在这段代码中有一个关闭资源错误: Connection c = DataSourceUtils.getConnection(dataSource);
是否有工具或插件来跟踪每个开发人员的 PMD、CheckStyle 和 Findbugs 不合规报告 谢谢韩国 最佳答案 似乎Sonar是你需要的 Sonar is an open source qu
我想在 PMD 中使用自定义规则。我在 jenkins 中安装了 PMD 插件,我还创建了一个 jar: 规则集文件 自定义规则的java代码(自定义规则扩展自AbstractJavaRule)。 我
http://maven.apache.org/plugins/maven-pmd-plugin/目前版本为 2.4,支持 PMD 版本 4.2.2 是否可以将 PMD 版本 4.2.5 与此插件一起
我们如何在 eclipse pmd 插件中添加新的基于 java 的 pmd 规则? 我收到以下错误: 无效的类实现。类必须在插件类路径中并实现规则接口(interface)。 我用 Abstract
我在 Jenkins 上使用 Sonar 的 PMD 插件对我的代码进行静态分析。我也在运行 Eclipse 的 PMD 插件(准确地说是 eclipse-pmd 1.5 ( http://marke
我想通过永久链接使用我的 Sonar PMD 配置, 这是我的 maven pom.xml 的构建部分 install org.apach
我们的 Jenkins 实例中有许多 Maven 作业,每个作业都有自己特定的调用字符串,在构建配置中指定,类似于 mvn clean install -DDISABLED="javadoc:aggr
PMD和SonarQube是一个很好的工具,但是我在抑制PMD警告时遇到了问题。 我们在项目中经常使用Lombok,因此许多模型类都有: @SuppressWarnings(“PMD.UnusedPr
也许只有我一个人,但是我找不到PMD中具有最高优先级的信息: 1 或 5 吗? 由于http://pmd.sourceforge.net/running.html和命令行参数-minimumprior
是否有很好的资源来描述 PMD 规则集背后的“原因”? PMD's site有“什么”——每条规则的作用——但它没有描述为什么 PMD 有这条规则,以及为什么忽略这条规则会给你在现实世界中带来麻烦。特
我用声纳开始了我的冒险;) 声纳的默认配置在主要级别设置了 PMD UnnecessaryLocalBeforeReturn 错误。 List filtered = em.createQuer
我正在尝试微调我们的 CI,但我无法弄清楚如何避免 PMD 在 src-gen 中报告生成代码的违规行为(不讨论那里的 Android R 文件): 我使用 mvn help:effective-po
我想在我的gradle项目中设置PMD,使其具有两个规则集,一个规则集是强制性的,可以中断构建,而另一个规则集只是报告但可以继续构建。这可能吗? 最佳答案 绝对有可能! 默认情况下,PMD插件将为每个
我在 Windows 上的 Eclipse 中使用 pmd 时出现严重的内存泄漏。我导入了一堆大型 Maven 项目。 m2e 和编译后 PMD 启动。然后,它最终在工作区中的许多(大约 50 个)项
如何定义 custom-rulesets.xml在父项目中,所以它在子模块中被重用? 我有一个运行良好的 PMD 示例项目 ( you can check later )。 但是,这个 Maven 项
我正在创建一个基于 maven 的 java 项目,其中包含 PMD maven 插件。我使用我自己的规则集 XML,它的工作原理就像一个魅力,除了两个规则集:emptycode 和 unnecess
我是一名优秀的程序员,十分优秀!