Skip to content

Commit

Permalink
Add detekt
Browse files Browse the repository at this point in the history
  • Loading branch information
AChep committed Mar 15, 2021
1 parent 50f5fb7 commit 2cbeaf9
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/detekt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Detekt

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
publish:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: "Setup JDK 11"
id: setup-java
uses: actions/setup-java@v1
with:
java-version: "11"
- name: "./gradlew check"
uses: eskatos/gradle-command-action@v1
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
with:
arguments: "check"
- name: "Upload SARIF"
uses: github/codeql-action/upload-sarif@v1
if: $
with:
sarif_file: library/build/reports/detekt/detekt.sarif
13 changes: 13 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'io.gitlab.arturbosch.detekt' version "1.16.0"
}

detekt {
buildUponDefaultConfig = true
allRules = false

reports {
html.enabled = true
sarif.enabled = true
}
}

tasks.detekt.jvmTarget = "1.8"

android {
compileSdkVersion 30

Expand Down
1 change: 1 addition & 0 deletions library/src/main/java/com/artemchep/bindin/BindOut.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ fun <T> InBinding<T>.bindOut(
)
}

@Suppress("FunctionName")
private fun <T> InBinding<T>._pipe(
value: T,
/** A pipe to pass data to... */
Expand Down

0 comments on commit 2cbeaf9

Please sign in to comment.