swiftlint_translate_checkstyle_format 0.1.0 → 0.1.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e2ee73b7b82b4e5d9017e18e1cc3cd5a905e780
|
4
|
+
data.tar.gz: d2978701221bc962ab5645507d05560a7e3a8116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f393903f91e19545af8cda50c49b443df0c22783375ae072ec7251a069512e88f5db86b2c64003f43b3f11ad1f489d357ff294787b044482661ebb09a2d3dcc
|
7
|
+
data.tar.gz: e9428630f4a3f5991afcb2efadfb69bc1d9653eecb6f2400e081526c1f69cbffa3afe550024c57a215d9692692212f2f0d86bd6631d63c6337d31d63c33e32c8
|
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# SwiftlintTranslateCheckstyleFormat
|
2
2
|
|
3
|
-
|
3
|
+
[](http://badge.fury.io/rb/swiftlint_translate_checkstyle_format)
|
4
|
+
[](https://travis-ci.org/noboru-i/swiftlint_translate_checkstyle_format)
|
5
|
+
[](https://codeclimate.com/github/noboru-i/swiftlint_translate_checkstyle_format)
|
6
|
+
[](https://coveralls.io/r/noboru-i/swiftlint_translate_checkstyle_format)
|
4
7
|
|
5
|
-
|
8
|
+
Translate SwiftLint json format into checkstyle format.
|
6
9
|
|
7
10
|
## Installation
|
8
11
|
|
@@ -22,7 +25,20 @@ Or install it yourself as:
|
|
22
25
|
|
23
26
|
## Usage
|
24
27
|
|
25
|
-
|
28
|
+
First, you install [realm/SwiftLint](https://github.com/realm/SwiftLint).
|
29
|
+
And execute it with `reporter: json` in `.swiftlint.xml`.
|
30
|
+
|
31
|
+
### Use pipe
|
32
|
+
|
33
|
+
```
|
34
|
+
cat swiftlint.result.json | swiftlint_translate_checkstyle_format translate
|
35
|
+
```
|
36
|
+
|
37
|
+
### Use command-line option
|
38
|
+
|
39
|
+
```
|
40
|
+
swiftlint_translate_checkstyle_format translate --file="swiftlint.result.json"
|
41
|
+
```
|
26
42
|
|
27
43
|
## Development
|
28
44
|
|
@@ -38,4 +54,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
|
|
38
54
|
## License
|
39
55
|
|
40
56
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
-
|
@@ -19,7 +19,7 @@ module SwiftlintTranslateCheckstyleFormat
|
|
19
19
|
|
20
20
|
json.each do |result|
|
21
21
|
file = checkstyle.add_element('file',
|
22
|
-
'name' =>
|
22
|
+
'name' => result['file']
|
23
23
|
)
|
24
24
|
file.add_element('error',
|
25
25
|
'line' => result['line'],
|
@@ -31,10 +31,6 @@ module SwiftlintTranslateCheckstyleFormat
|
|
31
31
|
doc
|
32
32
|
end
|
33
33
|
|
34
|
-
def self.create_path(fila_path, json)
|
35
|
-
fila_path.gsub(Dir.pwd, '')
|
36
|
-
end
|
37
|
-
|
38
34
|
def self.add_dummy(checkstyle)
|
39
35
|
checkstyle.add_element('file',
|
40
36
|
'name' => ''
|