rubocop 0.0.0 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubocop might be problematic. Click here for more details.
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/VERSION +1 -1
- data/bin/rubocop +10 -2
- data/lib/rubocop.rb +16 -1
- data/lib/rubocop/cli.rb +48 -13
- data/lib/rubocop/cop/cop.rb +60 -3
- data/lib/rubocop/cop/empty_lines.rb +25 -0
- data/lib/rubocop/cop/encoding.rb +17 -0
- data/lib/rubocop/cop/grammar.rb +74 -0
- data/lib/rubocop/cop/indentation.rb +55 -0
- data/lib/rubocop/cop/line_length.rb +19 -0
- data/lib/rubocop/cop/offence.rb +12 -4
- data/lib/rubocop/cop/space_after_comma_etc.rb +24 -0
- data/lib/rubocop/cop/surrounding_space.rb +44 -0
- data/lib/rubocop/cop/tab.rb +17 -0
- data/lib/rubocop/cop/trailing_whitespace.rb +17 -0
- data/lib/rubocop/report/emacs_style.rb +15 -0
- data/lib/rubocop/report/plain_text.rb +18 -0
- data/lib/rubocop/report/report.rb +41 -0
- data/lib/rubocop/version.rb +2 -0
- data/rubocop.gemspec +103 -0
- data/spec/rubocop/cli_spec.rb +61 -0
- data/spec/rubocop/cops/cop_spec.rb +29 -0
- data/spec/rubocop/cops/empty_lines_spec.rb +82 -0
- data/spec/rubocop/cops/grammar_spec.rb +24 -0
- data/spec/rubocop/cops/indentation_spec.rb +60 -0
- data/spec/rubocop/cops/line_length_spec.rb +20 -0
- data/spec/rubocop/cops/offence_spec.rb +22 -0
- data/spec/rubocop/cops/space_after_comma_etc_spec.rb +37 -0
- data/spec/rubocop/cops/surrounding_space_spec.rb +128 -0
- data/spec/rubocop/cops/tab_spec.rb +19 -0
- data/spec/rubocop/cops/trailing_whitespace_spec.rb +25 -0
- data/spec/rubocop/reports/emacs_style_spec.rb +23 -0
- data/spec/rubocop/reports/report_spec.rb +27 -0
- data/spec/spec_helper.rb +25 -1
- metadata +88 -18
- data/lib/rubocop/cop/line_length_cop.rb +0 -11
- data/spec/rubocop_spec.rb +0 -7
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rubocop
|
4
|
+
module Cop
|
5
|
+
describe Grammar do
|
6
|
+
EXAMPLE = '3.times { |i| x = i }'
|
7
|
+
let (:grammar) { Grammar.new(Ripper.lex(EXAMPLE)) }
|
8
|
+
|
9
|
+
it "correlates token indices to grammar paths" do
|
10
|
+
method_block = [:program, :method_add_block]
|
11
|
+
grammar.correlate(Ripper.sexp(EXAMPLE)).should == {
|
12
|
+
0 => method_block + [:call, :@int],
|
13
|
+
2 => method_block + [:call, :@ident],
|
14
|
+
6 => method_block + [:brace_block, :block_var],
|
15
|
+
7 => method_block + [:brace_block, :block_var, :params, :@ident],
|
16
|
+
8 => method_block + [:brace_block, :block_var],
|
17
|
+
10 => method_block + [:brace_block, :assign, :var_field, :@ident],
|
18
|
+
12 => method_block + [:brace_block, :assign],
|
19
|
+
14 => method_block + [:brace_block, :assign, :var_ref, :@ident],
|
20
|
+
}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rubocop
|
4
|
+
module Cop
|
5
|
+
describe Indentation do
|
6
|
+
let (:ind) { Indentation.new }
|
7
|
+
|
8
|
+
it "registers an offence for a when clause that's deeper than case" do
|
9
|
+
source = ['case a',
|
10
|
+
' when 0 then return',
|
11
|
+
' case b',
|
12
|
+
' when 1 then return',
|
13
|
+
' end',
|
14
|
+
'end']
|
15
|
+
ind.inspect_source('file.rb', source)
|
16
|
+
ind.offences.size.should == 2
|
17
|
+
end
|
18
|
+
|
19
|
+
it "accepts a when clause that's equally indented with case" do
|
20
|
+
source = ['y = case a',
|
21
|
+
' when 0 then break',
|
22
|
+
' when 0 then return',
|
23
|
+
' z = case b',
|
24
|
+
' when 1 then return',
|
25
|
+
' when 1 then break',
|
26
|
+
' end',
|
27
|
+
' end',
|
28
|
+
'case c',
|
29
|
+
'when 2 then encoding',
|
30
|
+
'end',
|
31
|
+
'']
|
32
|
+
ind.inspect_source('file.rb', source)
|
33
|
+
ind.offences.size.should == 0
|
34
|
+
end
|
35
|
+
|
36
|
+
it "doesn't get confused by strings with case in them" do
|
37
|
+
source = ['a = "case"',
|
38
|
+
'case x',
|
39
|
+
'when 0',
|
40
|
+
'end',
|
41
|
+
'']
|
42
|
+
ind.inspect_source('file.rb', source)
|
43
|
+
ind.offences.map(&:message).should == []
|
44
|
+
end
|
45
|
+
|
46
|
+
it "doesn't get confused by symbols named case or when" do
|
47
|
+
source = ['KEYWORDS = { :case => true, :when => true }',
|
48
|
+
'case type',
|
49
|
+
'when 0',
|
50
|
+
' ParameterNode',
|
51
|
+
'when 1',
|
52
|
+
' MethodCallNode',
|
53
|
+
'end',
|
54
|
+
'']
|
55
|
+
ind.inspect_source('file.rb', source)
|
56
|
+
ind.offences.map(&:message).should == []
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rubocop
|
4
|
+
module Cop
|
5
|
+
describe LineLength do
|
6
|
+
let (:ll) { LineLength.new }
|
7
|
+
|
8
|
+
it "registers an offence for a line that's 80 characters wide" do
|
9
|
+
ll.inspect('file.rb', ['#' * 80])
|
10
|
+
ll.offences.size.should == 1
|
11
|
+
ll.offences.first.message.should == 'Line is too long. [80/79]'
|
12
|
+
end
|
13
|
+
|
14
|
+
it "accepts a line that's 79 characters wide" do
|
15
|
+
ll.inspect('file.rb', ['#' * 79])
|
16
|
+
ll.offences.size.should == 0
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rubocop
|
4
|
+
module Cop
|
5
|
+
describe Offence do
|
6
|
+
it 'has a few required attributes' do
|
7
|
+
offence = Offence.new(:convention, 1, 'line', 'message')
|
8
|
+
|
9
|
+
offence.severity.should == :convention
|
10
|
+
offence.line_number.should == 1
|
11
|
+
offence.line.should == 'line'
|
12
|
+
offence.message.should == 'message'
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'overrides #to_s' do
|
16
|
+
offence = Offence.new(:convention, 1, 'line', 'message')
|
17
|
+
|
18
|
+
offence.to_s.should == 'C: 1: message'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rubocop
|
4
|
+
module Cop
|
5
|
+
describe SpaceAfterCommaEtc do
|
6
|
+
let (:space) { SpaceAfterCommaEtc.new }
|
7
|
+
|
8
|
+
it 'registers an offence for block argument commas' do
|
9
|
+
space.inspect_source('file.rb', ['each { |s,t| }'])
|
10
|
+
space.offences.map(&:message).should ==
|
11
|
+
['Space missing after comma.']
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'registers an offence for colon without space after it' do
|
15
|
+
space.inspect_source('file.rb', ['x = w ? {a:3}:4'])
|
16
|
+
space.offences.map(&:message).should ==
|
17
|
+
['Space missing after colon.'] * 2
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'registers an offence for semicolon without space after it' do
|
21
|
+
space.inspect_source('file.rb', ['x = 1;y = 2'])
|
22
|
+
space.offences.map(&:message).should ==
|
23
|
+
['Space missing after semicolon.']
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'allows the colons in symbols' do
|
27
|
+
space.inspect_source('file.rb', ['x = :a'])
|
28
|
+
space.offences.map(&:message).should == []
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'allows colons in strings' do
|
32
|
+
space.inspect_source('file.rb', ["str << ':'"])
|
33
|
+
space.offences.map(&:message).should == []
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rubocop
|
4
|
+
module Cop
|
5
|
+
describe SurroundingSpace do
|
6
|
+
let (:space) { SurroundingSpace.new }
|
7
|
+
|
8
|
+
it 'registers an offence for assignment without space on both sides' do
|
9
|
+
space.inspect_source('file.rb', ['x=0', 'y= 0', 'z =0'])
|
10
|
+
space.offences.size.should == 3
|
11
|
+
space.offences.first.message.should ==
|
12
|
+
"Surrounding space missing for operator '='."
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'registers an offence for binary operators that could be unary' do
|
16
|
+
space.inspect_source('file.rb', ['a-3', 'x&0xff', 'z+0'])
|
17
|
+
space.offences.map(&:message).should ==
|
18
|
+
["Surrounding space missing for operator '-'.",
|
19
|
+
"Surrounding space missing for operator '&'.",
|
20
|
+
"Surrounding space missing for operator '+'."]
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'registers an offence for arguments to a method' do
|
24
|
+
space.inspect_source('file.rb', ['puts 1+2'])
|
25
|
+
space.offences.map(&:message).should ==
|
26
|
+
["Surrounding space missing for operator '+'."]
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'accepts parentheses in block parameter list' do
|
30
|
+
space.inspect_source('file.rb',
|
31
|
+
['list.inject(Tms.new) { |sum, (label, item)|',
|
32
|
+
'}'])
|
33
|
+
space.offences.map(&:message).should == []
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'accepts operator symbols' do
|
37
|
+
space.inspect_source('file.rb', ['func(:-)'])
|
38
|
+
space.offences.map(&:message).should == []
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'accepts ranges' do
|
42
|
+
space.inspect_source('file.rb', ['a, b = (1..2), (1...3)'])
|
43
|
+
space.offences.map(&:message).should == []
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'accepts scope operator' do
|
47
|
+
source = ['@io.class == Zlib::GzipWriter']
|
48
|
+
space.inspect_source('file.rb', source)
|
49
|
+
space.offences.map(&:message).should == []
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'accepts ::Kernel::raise' do
|
53
|
+
source = ['::Kernel::raise IllegalBlockError.new']
|
54
|
+
space.inspect_source('file.rb', source)
|
55
|
+
space.offences.map(&:message).should == []
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'accepts exclamation point negation' do
|
59
|
+
space.inspect_source('file.rb', ['x = !a&&!b'])
|
60
|
+
space.offences.map(&:message).should ==
|
61
|
+
["Surrounding space missing for operator '&&'."]
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'accepts exclamation point definition' do
|
65
|
+
space.inspect_source('file.rb', [' def !',
|
66
|
+
' !__getobj__',
|
67
|
+
' end'])
|
68
|
+
space.offences.should == []
|
69
|
+
space.offences.map(&:message).should == []
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'accepts a unary' do
|
73
|
+
space.inspect_source('file.rb',
|
74
|
+
[' def bm(label_width = 0, *labels, &blk)',
|
75
|
+
' benchmark(CAPTION, label_width, FORMAT,',
|
76
|
+
' *labels, &blk)',
|
77
|
+
' end',
|
78
|
+
''])
|
79
|
+
space.offences.map(&:message).should == []
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'accepts splat operator' do
|
83
|
+
space.inspect_source('file.rb', ['return *list if options'])
|
84
|
+
space.offences.map(&:message).should == []
|
85
|
+
end
|
86
|
+
|
87
|
+
it 'accepts square brackets as method name' do
|
88
|
+
space.inspect_source('file.rb', ['def Vector.[](*array)',
|
89
|
+
'end'])
|
90
|
+
space.offences.map(&:message).should == []
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'accepts def of operator' do
|
94
|
+
space.inspect_source('file.rb', ['def +(other); end'])
|
95
|
+
space.offences.map(&:message).should == []
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'accepts an assignment with spaces' do
|
99
|
+
space.inspect_source('file.rb', ['x = 0'])
|
100
|
+
space.offences.size.should == 0
|
101
|
+
end
|
102
|
+
|
103
|
+
it "accepts some operators that are exceptions and don't need spaces" do
|
104
|
+
space.inspect_source('file.rb', ['(1..3)',
|
105
|
+
'ActionController::Base',
|
106
|
+
'each { |s, t| }'])
|
107
|
+
space.offences.map(&:message).should == []
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'accepts an assignment followed by newline' do
|
111
|
+
space.inspect_source('file.rb', ['x =\n 0'])
|
112
|
+
space.offences.size.should == 0
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'accepts unary operators without space' do
|
116
|
+
space.inspect_source('file.rb', ['[].map(&:size)',
|
117
|
+
'-3',
|
118
|
+
'x = +2'])
|
119
|
+
space.offences.map(&:message).should == []
|
120
|
+
end
|
121
|
+
|
122
|
+
it 'accepts square brackets called with method call syntax' do
|
123
|
+
space.inspect_source('file.rb', ['subject.[](0)'])
|
124
|
+
space.offences.map(&:message).should == []
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rubocop
|
4
|
+
module Cop
|
5
|
+
describe Tab do
|
6
|
+
let (:tab) { Tab.new }
|
7
|
+
|
8
|
+
it 'registers an offence for a line indented with tab' do
|
9
|
+
tab.inspect('file.rb', ["\tx = 0"])
|
10
|
+
tab.offences.size.should == 1
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'accepts a line with tab in a string' do
|
14
|
+
tab.inspect('file.rb', [%Q(x = "\t")])
|
15
|
+
tab.offences.size.should == 0
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rubocop
|
4
|
+
module Cop
|
5
|
+
describe TrailingWhitespace do
|
6
|
+
let (:tws) { TrailingWhitespace.new }
|
7
|
+
|
8
|
+
it 'registers an offence for a line ending with space' do
|
9
|
+
source = ['x = 0 ']
|
10
|
+
tws.inspect('file.rb', source)
|
11
|
+
tws.offences.size.should == 1
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'registers an offence for a line ending with tab' do
|
15
|
+
tws.inspect('file.rb', ["x = 0\t"])
|
16
|
+
tws.offences.size.should == 1
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'accepts a line without trailing whitespace' do
|
20
|
+
tws.inspect('file.rb', ["x = 0\n"])
|
21
|
+
tws.offences.size.should == 0
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
module Rubocop
|
5
|
+
module Report
|
6
|
+
describe EmacsStyle do
|
7
|
+
let (:emacs_style) { Rubocop::Report.create('test', :emacs_style) }
|
8
|
+
|
9
|
+
it 'displays parsable text' do
|
10
|
+
cop = Cop::Cop.new
|
11
|
+
cop.add_offence(:convention, 0, 'line', 'message 1')
|
12
|
+
cop.add_offence(:fatal, 10, 'line', 'message 2')
|
13
|
+
|
14
|
+
emacs_style << cop
|
15
|
+
|
16
|
+
s = StringIO.new
|
17
|
+
emacs_style.display(s)
|
18
|
+
s.string.should == ["test:1: C: message 1",
|
19
|
+
"test:11: F: message 2\n"].join("\n")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rubocop
|
4
|
+
module Report
|
5
|
+
describe Report do
|
6
|
+
let (:report) { Report.new('test') }
|
7
|
+
|
8
|
+
it 'initially has 0 entries' do
|
9
|
+
report.entries.size.should == 0
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'initially has nothing to report' do
|
13
|
+
report.empty?.should be_true
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'keeps track of offences' do
|
17
|
+
cop = Cop::Cop.new
|
18
|
+
cop.add_offence(:convention, 0, 'line', 'message')
|
19
|
+
|
20
|
+
report << cop
|
21
|
+
|
22
|
+
report.empty?.should be_false
|
23
|
+
report.entries.size.should == 1
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -7,6 +7,30 @@ require 'rubocop'
|
|
7
7
|
# in ./support/ and its subdirectories.
|
8
8
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
9
|
|
10
|
+
module ExitCodeMatchers
|
11
|
+
RSpec::Matchers.define :exit_with_code do |code|
|
12
|
+
actual = nil
|
13
|
+
match do |block|
|
14
|
+
begin
|
15
|
+
block.call
|
16
|
+
rescue SystemExit => e
|
17
|
+
actual = e.status
|
18
|
+
end
|
19
|
+
actual and actual == code
|
20
|
+
end
|
21
|
+
failure_message_for_should do |block|
|
22
|
+
"expected block to call exit(#{code}) but exit" +
|
23
|
+
(actual.nil? ? " not called" : "(#{actual}) was called")
|
24
|
+
end
|
25
|
+
failure_message_for_should_not do |block|
|
26
|
+
"expected block not to call exit(#{code})"
|
27
|
+
end
|
28
|
+
description do
|
29
|
+
"expect block to call exit(#{code})"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
10
34
|
RSpec.configure do |config|
|
11
|
-
|
35
|
+
config.include(ExitCodeMatchers)
|
12
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: 2.8.0
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.8.0
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: yard
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,10 +37,31 @@ dependencies:
|
|
32
37
|
version: '0.7'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0.7'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: redcarpet
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
36
62
|
- !ruby/object:Gem::Dependency
|
37
63
|
name: cucumber
|
38
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
39
65
|
none: false
|
40
66
|
requirements:
|
41
67
|
- - ! '>='
|
@@ -43,10 +69,15 @@ dependencies:
|
|
43
69
|
version: '0'
|
44
70
|
type: :development
|
45
71
|
prerelease: false
|
46
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
47
78
|
- !ruby/object:Gem::Dependency
|
48
79
|
name: bundler
|
49
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
50
81
|
none: false
|
51
82
|
requirements:
|
52
83
|
- - ~>
|
@@ -54,10 +85,15 @@ dependencies:
|
|
54
85
|
version: 1.1.0
|
55
86
|
type: :development
|
56
87
|
prerelease: false
|
57
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.1.0
|
58
94
|
- !ruby/object:Gem::Dependency
|
59
95
|
name: jeweler
|
60
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
61
97
|
none: false
|
62
98
|
requirements:
|
63
99
|
- - ~>
|
@@ -65,10 +101,15 @@ dependencies:
|
|
65
101
|
version: 1.8.3
|
66
102
|
type: :development
|
67
103
|
prerelease: false
|
68
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.8.3
|
69
110
|
- !ruby/object:Gem::Dependency
|
70
111
|
name: simplecov
|
71
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
72
113
|
none: false
|
73
114
|
requirements:
|
74
115
|
- - ! '>='
|
@@ -76,7 +117,12 @@ dependencies:
|
|
76
117
|
version: '0'
|
77
118
|
type: :development
|
78
119
|
prerelease: false
|
79
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
80
126
|
description: Automatic Ruby code style checking tool. Aims to enforce the community-driven
|
81
127
|
Ruby Style Guide.
|
82
128
|
email: bozhidar@batsov.com
|
@@ -103,10 +149,34 @@ files:
|
|
103
149
|
- lib/rubocop.rb
|
104
150
|
- lib/rubocop/cli.rb
|
105
151
|
- lib/rubocop/cop/cop.rb
|
106
|
-
- lib/rubocop/cop/
|
152
|
+
- lib/rubocop/cop/empty_lines.rb
|
153
|
+
- lib/rubocop/cop/encoding.rb
|
154
|
+
- lib/rubocop/cop/grammar.rb
|
155
|
+
- lib/rubocop/cop/indentation.rb
|
156
|
+
- lib/rubocop/cop/line_length.rb
|
107
157
|
- lib/rubocop/cop/offence.rb
|
158
|
+
- lib/rubocop/cop/space_after_comma_etc.rb
|
159
|
+
- lib/rubocop/cop/surrounding_space.rb
|
160
|
+
- lib/rubocop/cop/tab.rb
|
161
|
+
- lib/rubocop/cop/trailing_whitespace.rb
|
162
|
+
- lib/rubocop/report/emacs_style.rb
|
163
|
+
- lib/rubocop/report/plain_text.rb
|
164
|
+
- lib/rubocop/report/report.rb
|
108
165
|
- lib/rubocop/version.rb
|
109
|
-
-
|
166
|
+
- rubocop.gemspec
|
167
|
+
- spec/rubocop/cli_spec.rb
|
168
|
+
- spec/rubocop/cops/cop_spec.rb
|
169
|
+
- spec/rubocop/cops/empty_lines_spec.rb
|
170
|
+
- spec/rubocop/cops/grammar_spec.rb
|
171
|
+
- spec/rubocop/cops/indentation_spec.rb
|
172
|
+
- spec/rubocop/cops/line_length_spec.rb
|
173
|
+
- spec/rubocop/cops/offence_spec.rb
|
174
|
+
- spec/rubocop/cops/space_after_comma_etc_spec.rb
|
175
|
+
- spec/rubocop/cops/surrounding_space_spec.rb
|
176
|
+
- spec/rubocop/cops/tab_spec.rb
|
177
|
+
- spec/rubocop/cops/trailing_whitespace_spec.rb
|
178
|
+
- spec/rubocop/reports/emacs_style_spec.rb
|
179
|
+
- spec/rubocop/reports/report_spec.rb
|
110
180
|
- spec/spec_helper.rb
|
111
181
|
homepage: http://github.com/bbatsov/rubocop
|
112
182
|
licenses:
|
@@ -123,7 +193,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
193
|
version: '0'
|
124
194
|
segments:
|
125
195
|
- 0
|
126
|
-
hash:
|
196
|
+
hash: 3628988712986097770
|
127
197
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
198
|
none: false
|
129
199
|
requirements:
|
@@ -132,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
202
|
version: '0'
|
133
203
|
requirements: []
|
134
204
|
rubyforge_project:
|
135
|
-
rubygems_version: 1.8.
|
205
|
+
rubygems_version: 1.8.23
|
136
206
|
signing_key:
|
137
207
|
specification_version: 3
|
138
208
|
summary: Automatic Ruby code style checking tool.
|