Skip to content

Make lint files optional & Upgrade version to 2.2.0 #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


# AndroidLintReporter [![](https://img.shields.io/badge/latest-2.1.0-blue)](https://plugins.gradle.org/plugin/com.worker8.android_lint_reporter) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# AndroidLintReporter [![](https://img.shields.io/badge/latest-2.2.0-blue)](https://plugins.gradle.org/plugin/com.worker8.android_lint_reporter) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

<img width="300" alt="Android Lint Reporter Logo" src="https://user-images.githubusercontent.com/1988156/79091365-fc968000-7d87-11ea-997d-2a0fa1f6ec5a.png">

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object Constant {
val pluginName = "AndroidLintReporterPlugin"
val id = "com.worker8.android_lint_reporter"
val implementationClass = "android_lint_reporter.AndroidLintReporterPlugin"
val version = "2.1.0"
val version = "2.2.0"
val website = "https://github.com/worker8/AndroidLintReporter"
val displayName = "Android Lint Reporter"
val description = "Gradle Plugin to parse, format, report Android Lint result back to Github Pull Request using Github Actions"
Expand Down
12 changes: 10 additions & 2 deletions src/main/kotlin/android_lint_reporter/AndroidLintReporterPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,16 @@ class AndroidLintReporterPlugin : Plugin<Project> {
}

/* parse lint issues */
val githubIssues = Parser.parse(File(extension.lintFilePath))
val detektIssues = Parser.parseDetektXml(File(extension.detektFilePath))
val githubIssues = if (extension.lintFilePath.isNotEmpty()) {
Parser.parse(File(extension.lintFilePath))
} else {
emptyList()
}
val detektIssues = if (extension.detektFilePath.isNotEmpty()) {
Parser.parseDetektXml(File(extension.detektFilePath))
} else {
emptyList()
}
printLog("Number of Android Lint Issues: ${githubIssues.size}")
printLog("Number of Detekt Issues: ${detektIssues.size}")
val combinedLineHashMap = hashMapOf<String, MutableSet<Int>>()
Expand Down