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: 8ccb55e2f8803313a5af2eb8c39d140a5d50affd
4
- data.tar.gz: 29f541e534b04b1f0c327630292a17a2de25a534
3
+ metadata.gz: 3e2ee73b7b82b4e5d9017e18e1cc3cd5a905e780
4
+ data.tar.gz: d2978701221bc962ab5645507d05560a7e3a8116
5
5
  SHA512:
6
- metadata.gz: 0810b5526d78095540edf587cdba6c8f0f33ff8d2beaaa0e5136abc2d187cb6d4c8127af49b65666744e2e19a7c07c6ebbc4a55e9c6e193729ed9b5f8df130c8
7
- data.tar.gz: d2d099fab1bd2fc29341d0fc4e85681001d7e39407f5c61fbecb2928a96ac6a0a8950d85a4bbae4cede62d8b1c1de6c5831dedeb399403191f70f08819ca8828
6
+ metadata.gz: 6f393903f91e19545af8cda50c49b443df0c22783375ae072ec7251a069512e88f5db86b2c64003f43b3f11ad1f489d357ff294787b044482661ebb09a2d3dcc
7
+ data.tar.gz: e9428630f4a3f5991afcb2efadfb69bc1d9653eecb6f2400e081526c1f69cbffa3afe550024c57a215d9692692212f2f0d86bd6631d63c6337d31d63c33e32c8
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # SwiftlintTranslateCheckstyleFormat
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/swiftlint_translate_checkstyle_format`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/swiftlint_translate_checkstyle_format.svg)](http://badge.fury.io/rb/swiftlint_translate_checkstyle_format)
4
+ [![Build Status](https://travis-ci.org/noboru-i/swiftlint_translate_checkstyle_format.svg?branch=master)](https://travis-ci.org/noboru-i/swiftlint_translate_checkstyle_format)
5
+ [![Code Climate](https://codeclimate.com/github/noboru-i/swiftlint_translate_checkstyle_format/badges/gpa.svg)](https://codeclimate.com/github/noboru-i/swiftlint_translate_checkstyle_format)
6
+ [![Coverage Status](https://coveralls.io/repos/noboru-i/swiftlint_translate_checkstyle_format/badge.svg)](https://coveralls.io/r/noboru-i/swiftlint_translate_checkstyle_format)
4
7
 
5
- TODO: Delete this and the text above, and describe your gem
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
- TODO: Write usage instructions here
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' => SwiftlintTranslateCheckstyleFormat::Translate.create_path(result['file'], json)
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' => ''
@@ -1,3 +1,3 @@
1
1
  module SwiftlintTranslateCheckstyleFormat
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swiftlint_translate_checkstyle_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - noboru-i