rubocop-checkstyle_formatter 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -30,12 +30,22 @@ module Rubocop
|
|
30
30
|
REXML::Element.new('error', parent).tap do |e|
|
31
31
|
e.attributes['line'] = offence.line
|
32
32
|
e.attributes['column'] = offence.column
|
33
|
-
e.attributes['severity'] = offence.severity
|
33
|
+
e.attributes['severity'] = to_checkstyle_severity(offence.severity)
|
34
34
|
e.attributes['message'] = offence.message
|
35
35
|
e.attributes['source'] = offence.cop_name
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
39
|
+
|
40
|
+
# TODO be able to configure severity mapping
|
41
|
+
def to_checkstyle_severity(rubocop_severity)
|
42
|
+
case rubocop_serverity
|
43
|
+
when :fatal, :error; 'high'
|
44
|
+
when :warning; 'medium'
|
45
|
+
when :convention, :refactor; 'low'
|
46
|
+
else; 'medium'
|
47
|
+
end
|
48
|
+
end
|
39
49
|
end
|
40
50
|
end
|
41
51
|
end
|
@@ -4,12 +4,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = 'rubocop-checkstyle_formatter'
|
7
|
-
gem.version = '0.0.
|
7
|
+
gem.version = '0.0.2'
|
8
8
|
gem.authors = ['Eito Katagiri']
|
9
9
|
gem.email = ['eitoball@gmail.com']
|
10
10
|
gem.description = %q{A formatter for rubocop that outputs in checkstyle format}
|
11
11
|
gem.summary = %q{A formatter for rubocop that outputs in checkstyle format}
|
12
|
-
gem.homepage =
|
12
|
+
gem.homepage = 'https://github.com/eitoball/rubocop-checkstyle_formatter'
|
13
|
+
gem.license = 'MIT'
|
13
14
|
|
14
15
|
gem.files = `git ls-files`.split($/)
|
15
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-checkstyle_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubocop
|
@@ -41,8 +41,9 @@ files:
|
|
41
41
|
- Rakefile
|
42
42
|
- lib/rubocop/formatter/checkstyle_formatter.rb
|
43
43
|
- rubocop-checkstyle_formatter.gemspec
|
44
|
-
homepage:
|
45
|
-
licenses:
|
44
|
+
homepage: https://github.com/eitoball/rubocop-checkstyle_formatter
|
45
|
+
licenses:
|
46
|
+
- MIT
|
46
47
|
post_install_message:
|
47
48
|
rdoc_options: []
|
48
49
|
require_paths:
|