ktlint_reporter 0.1.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/checkstyle_reports/gem_version.rb +1 -1
- data/lib/checkstyle_reports/plugin.rb +9 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00d253190bfae0cb25f3853c7c7bbae75b9d9ca11c9f1e1e8e042f487766f541
|
4
|
+
data.tar.gz: 9539dddc3b7928f85b24ad351c3b349fc3fd0f3ebadd16e67235fad86245d9ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 403c4c557bc32672652360f988a049ee2f4ebc0cf679b16ca1e6dcfa813589608a41af5c739f5eac14f4cce36850700a7370e0b43a48abd122d7c8e87cf28ca1
|
7
|
+
data.tar.gz: b9aff72fb38e31473412a4d3baa76afe69c4748115edaf1241da3fd4e2314ae618c6d5efb58b6217e79574a939d40cd8699f28df07c9b8a95a83a8848aa10928
|
@@ -125,9 +125,10 @@ module Danger
|
|
125
125
|
target_files = git.modified_files + git.added_files
|
126
126
|
target_lines = {}
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
128
|
+
if filtering_lines
|
129
|
+
target_files.each do |file|
|
130
|
+
added_lines = parse_added_line_numbers(git.diff[file].patch)
|
131
|
+
target_lines[file] = added_lines
|
131
132
|
end
|
132
133
|
|
133
134
|
files.each do |f|
|
@@ -135,9 +136,11 @@ module Danger
|
|
135
136
|
# check severity
|
136
137
|
next unless base_severity <= e.severity
|
137
138
|
|
138
|
-
|
139
|
-
|
140
|
-
|
139
|
+
if filtering_lines
|
140
|
+
next unless target_files.include?(f.relative_path)
|
141
|
+
added_lines = target_lines[f.relative_path]
|
142
|
+
next unless added_lines.include?(e.line_number)
|
143
|
+
end
|
141
144
|
|
142
145
|
if inline_comment
|
143
146
|
public_send(report_method, e.html_unescaped_message, file: f.relative_path, line: e.line_number)
|