lib/android_lint/plugin.rb in danger-android_lint-0.0.10 vs lib/android_lint/plugin.rb in danger-android_lint-0.0.11
- old
+ new
@@ -82,13 +82,16 @@
# Enable filtering
# Only show messages within changed files.
attr_accessor :filtering
- # Only shows messages for the modified lines.
+ # Only show messages for the modified lines.
attr_accessor :filtering_lines
+ # Only show messages for issues not in this list.
+ attr_accessor :excluding_issue_ids
+
# Calls lint task of your gradle project.
# It fails if `gradlew` cannot be found inside current directory.
# It fails if `severity` level is not a valid option.
# It fails if `xmlReport` configuration is not set to `true` in your `build.gradle` file.
# @return [void]
@@ -165,9 +168,11 @@
dir = "#{Dir.pwd}/"
count = 0;
message = ""
results.each do |r|
+ issue_id = r.get('id')
+ next if excluding_issue_ids && excluding_issue_ids.include?(issue_id)
location = r.xpath('location').first
filename = location.get('file').gsub(dir, "")
next unless (!filtering && !filtering_lines) || (target_files.include? filename)
line = location.get('line').to_i || 'N/A'
reason = r.get('message')