Permalink
Browse files

Move Detekt usage to the SAP config

  • Loading branch information...
rock3r committed Aug 25, 2018
1 parent da8b6e2 commit 09154afeb611dc9340452d77a3f348f88b720107
Showing with 17 additions and 28 deletions.
  1. +0 −24 app/build.gradle
  2. +2 −1 dependencies.gradle
  3. +1 −1 team-props/git-hooks/pre-commit.sh
  4. +14 −2 team-props/static-analysis.gradle
View
@@ -102,30 +102,6 @@ play {
// track = 'production'
}
//detekt {
// profile = 'main'
// version = '1.0.0.RC8'
//
// profile('main') {
// input = "$projectDir/src/main/java"
// config = teamPropsFile('static-analysis/detekt-config.yml')
// filters = '.*test.*,.*/resources/.*,.*/tmp/.*'
// output = "$projectDir/build/reports/detekt"
// }
//
// idea {
// path = "$rootDir/.idea"
// codeStyleScheme = "$rootDir/.idea/codeStyles/Project.xml"
// inspectionsProfile = "$rootDir/.idea/inspectionProfiles/Squanchy.xml"
// report = "$projectDir/build/reports/detekt-idea"
// mask = "*.kt,"
// }
//}
//project.afterEvaluate {
// check.dependsOn tasks['detektCheck']
//}
dependencies {
implementation project(':renderthread')
View
@@ -5,7 +5,8 @@ ext {
kotlinVersion = '1.2.61'
moshiVersion = '1.6.0'
ktLintVersion = '0.27.0'
detektVersion = '1.0.0.RC8'
ktlintVersion = '0.27.0'
gradlePlugins = [
buildProperties: 'com.novoda:gradle-build-properties-plugin:0.4.1',
@@ -3,7 +3,7 @@
echo "Running static analysis..."
# Validate Kotlin code with detekt and KtLint before committing
./gradlew app:detektCheck app:ktlint --daemon
./gradlew app:detektCheck app:ktlintCheck --daemon
status=$?
@@ -1,5 +1,5 @@
apply plugin: 'com.novoda.static-analysis'
//apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: 'org.jlleitschuh.gradle.ktlint'
staticAnalysis {
@@ -14,8 +14,20 @@ staticAnalysis {
ktlint {
android true
version ktLintVersion
version ktlintVersion
// reporters = [ReporterType.PLAIN_GROUP_BY_FILE, ReporterType.CHECKSTYLE]
includeVariants { variant -> variant.name == 'release' }
}
detekt {
version detektVersion
defaultProfile {
input = "$projectDir/src/"
config = teamPropsFile('static-analysis/detekt-config.yml')
filters = '.*/test/.*,.*/resources/.*,.*/tmp/.*,.*/build/.*,.*/debug/.*'
output = "$projectDir/build/reports/detekt"
parallel = true
}
}
}

0 comments on commit 09154af

Please sign in to comment.