android_lint_translate_checkstyle_format 0.1.1 → 0.1.2

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: 88dbc8a8cdbcd525db0b99dda93bdb8efa54e4ce
4
- data.tar.gz: 2324d590791ceb8eea4309f4656b27697bdf04be
3
+ metadata.gz: b5ddc19a1ffa607d8f78e50f014fc6792bab55f8
4
+ data.tar.gz: f8e799e21cafd477aedf169b4343b6bd93184cea
5
5
  SHA512:
6
- metadata.gz: 0d748a0076d1f8d64a3b76b5312c7feb888e8871aa4f1df237931d9da42f8fda4c1816b54202e661abf0f617573e119a01aa90c7a104e354e561fe982f29165e
7
- data.tar.gz: 5771ab1427950eba7312fd1fa2c23fab44f675b0b09117864f042238956a861c59acc8653b25cd75b61f6566221a63eb668c4c7fe1350a2b242c5a2f02dd1100
6
+ metadata.gz: f617b8cbaa9e4eba81df80f718c214d1c1b6b9dd39eabd27109ddc9327df2fbf16c8ab437ff1cb476fb85ee0d0421146e8087ff804b543dae5aa638e11a793c9
7
+ data.tar.gz: 4b4b079025f493d56eac5278ac3f86b272eef3f362f11f6ebe8389483676fa860581b570a1fd9a48c02c85c78add5588d2729c5596796d9faf5867933145fc96
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # AndroidLintTranslateCheckstyleFormat
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/android_lint_translate_checkstyle_format`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/android_lint_translate_checkstyle_format.svg)](http://badge.fury.io/rb/android_lint_translate_checkstyle_format)
4
+ [![Build Status](https://travis-ci.org/noboru-i/android_lint_translate_checkstyle_format.svg)](https://travis-ci.org/noboru-i/android_lint_translate_checkstyle_format)
5
+ [![Code Climate](https://codeclimate.com/github/noboru-i/android_lint_translate_checkstyle_format/badges/gpa.svg)](https://codeclimate.com/github/noboru-i/android_lint_translate_checkstyle_format)
6
+ [![Coverage Status](https://coveralls.io/repos/noboru-i/android_lint_translate_checkstyle_format/badge.svg)](https://coveralls.io/r/noboru-i/android_lint_translate_checkstyle_format)
4
7
 
5
- TODO: Delete this and the text above, and describe your gem
8
+ Translate android lint format into checkstyle format.
6
9
 
7
10
  ## Installation
8
11
 
@@ -22,7 +25,17 @@ Or install it yourself as:
22
25
 
23
26
  ## Usage
24
27
 
25
- TODO: Write usage instructions here
28
+ ### Use pipe
29
+
30
+ ```
31
+ cat checkstyle.xml | android_lint_translate_checkstyle_format translate
32
+ ```
33
+
34
+ ### Use command-line option
35
+
36
+ ```
37
+ android_lint_translate_checkstyle_format translate --file="checkstyle.xml"
38
+ ```
26
39
 
27
40
  ## Development
28
41
 
@@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "bundler", "~> 1.10"
26
26
  spec.add_development_dependency "rake", "~> 10.0"
27
27
  spec.add_development_dependency "rspec"
28
+ spec.add_development_dependency "coveralls"
28
29
  end
@@ -14,7 +14,8 @@ module AndroidLintTranslateCheckstyleFormat
14
14
  doc << REXML::XMLDecl.new('1.0', 'UTF-8')
15
15
 
16
16
  checkstyle = doc.add_element("checkstyle")
17
- xml['issues']['issue'].each do |issue|
17
+ issues = xml['issues']['issue'].is_a?(Array) ? xml['issues']['issue'] : [xml['issues']['issue']]
18
+ issues.each do |issue|
18
19
  locations = issue['location'].is_a?(Array) ? issue['location'] : [issue['location']]
19
20
  locations.each do |location|
20
21
  file = checkstyle.add_element("file", {
@@ -22,7 +23,7 @@ module AndroidLintTranslateCheckstyleFormat
22
23
  })
23
24
  file.add_element("error", {
24
25
  'line' => location['@line'],
25
- 'severity' => issue['severity'],
26
+ 'severity' => issue['@severity'],
26
27
  'message' => "[#{issue['@id']}] #{issue['@message']}\n #{issue['@explanation']}"
27
28
  })
28
29
  end
@@ -1,3 +1,3 @@
1
1
  module AndroidLintTranslateCheckstyleFormat
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: android_lint_translate_checkstyle_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - noboru-i
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-11 00:00:00.000000000 Z
11
+ date: 2015-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nori
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: Translate android lint format into checkstyle format.
84
98
  email:
85
99
  - ishikura.noboru@gmail.com
@@ -88,6 +102,7 @@ executables:
88
102
  extensions: []
89
103
  extra_rdoc_files: []
90
104
  files:
105
+ - ".coveralls.yml"
91
106
  - ".gitignore"
92
107
  - ".rspec"
93
108
  - ".travis.yml"