android_lint_translate_checkstyle_format 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88dbc8a8cdbcd525db0b99dda93bdb8efa54e4ce
|
4
|
+
data.tar.gz: 2324d590791ceb8eea4309f4656b27697bdf04be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d748a0076d1f8d64a3b76b5312c7feb888e8871aa4f1df237931d9da42f8fda4c1816b54202e661abf0f617573e119a01aa90c7a104e354e561fe982f29165e
|
7
|
+
data.tar.gz: 5771ab1427950eba7312fd1fa2c23fab44f675b0b09117864f042238956a861c59acc8653b25cd75b61f6566221a63eb668c4c7fe1350a2b242c5a2f02dd1100
|
@@ -15,14 +15,17 @@ module AndroidLintTranslateCheckstyleFormat
|
|
15
15
|
|
16
16
|
checkstyle = doc.add_element("checkstyle")
|
17
17
|
xml['issues']['issue'].each do |issue|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
18
|
+
locations = issue['location'].is_a?(Array) ? issue['location'] : [issue['location']]
|
19
|
+
locations.each do |location|
|
20
|
+
file = checkstyle.add_element("file", {
|
21
|
+
'name' => location['@file']
|
22
|
+
})
|
23
|
+
file.add_element("error", {
|
24
|
+
'line' => location['@line'],
|
25
|
+
'severity' => issue['severity'],
|
26
|
+
'message' => "[#{issue['@id']}] #{issue['@message']}\n #{issue['@explanation']}"
|
27
|
+
})
|
28
|
+
end
|
26
29
|
end
|
27
30
|
|
28
31
|
doc
|