rubocop 0.3.0 → 0.4.0

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.
Files changed (83) hide show
  1. data/.rubocop.yml +40 -0
  2. data/.travis.yml +1 -0
  3. data/Gemfile +7 -10
  4. data/Gemfile.lock +21 -19
  5. data/README.md +62 -5
  6. data/VERSION +1 -1
  7. data/bin/rubocop +1 -1
  8. data/lib/rubocop/cli.rb +35 -15
  9. data/lib/rubocop/cop/class_and_module_camel_case.rb +20 -0
  10. data/lib/rubocop/cop/collection_methods.rb +29 -0
  11. data/lib/rubocop/cop/cop.rb +1 -1
  12. data/lib/rubocop/cop/def_parentheses.rb +4 -1
  13. data/lib/rubocop/cop/encoding.rb +6 -4
  14. data/lib/rubocop/cop/end_of_line.rb +1 -3
  15. data/lib/rubocop/cop/favor_modifier.rb +82 -0
  16. data/lib/rubocop/cop/favor_unless_over_negated_if.rb +47 -0
  17. data/lib/rubocop/cop/grammar.rb +3 -2
  18. data/lib/rubocop/cop/indentation.rb +1 -1
  19. data/lib/rubocop/cop/line_length.rb +7 -3
  20. data/lib/rubocop/cop/method_and_variable_snake_case.rb +31 -0
  21. data/lib/rubocop/cop/new_lambda_literal.rb +17 -0
  22. data/lib/rubocop/cop/parentheses_around_condition.rb +24 -0
  23. data/lib/rubocop/cop/surrounding_space.rb +48 -47
  24. data/lib/rubocop/cop/syntax.rb +19 -0
  25. data/lib/rubocop/cop/tab.rb +1 -3
  26. data/lib/rubocop/report/plain_text.rb +1 -1
  27. data/lib/rubocop/report/report.rb +5 -2
  28. data/lib/rubocop/version.rb +1 -1
  29. data/lib/rubocop.rb +14 -0
  30. data/rubocop.gemspec +38 -22
  31. data/spec/rubocop/cli_spec.rb +120 -40
  32. data/spec/rubocop/cops/align_parameters_spec.rb +29 -29
  33. data/spec/rubocop/cops/ampersands_pipes_vs_and_or_spec.rb +4 -4
  34. data/spec/rubocop/cops/class_and_module_camel_case_spec.rb +34 -0
  35. data/spec/rubocop/cops/collection_methods_spec.rb +39 -0
  36. data/spec/rubocop/cops/cop_spec.rb +5 -5
  37. data/spec/rubocop/cops/def_with_parentheses_spec.rb +5 -5
  38. data/spec/rubocop/cops/def_without_parentheses_spec.rb +4 -4
  39. data/spec/rubocop/cops/empty_lines_spec.rb +8 -8
  40. data/spec/rubocop/cops/encoding_spec.rb +17 -11
  41. data/spec/rubocop/cops/end_of_line_spec.rb +5 -5
  42. data/spec/rubocop/cops/favor_modifier_spec.rb +112 -0
  43. data/spec/rubocop/cops/favor_unless_over_negated_if_spec.rb +62 -0
  44. data/spec/rubocop/cops/favor_until_over_negated_while_spec.rb +45 -0
  45. data/spec/rubocop/cops/grammar_spec.rb +14 -9
  46. data/spec/rubocop/cops/hash_syntax_spec.rb +10 -10
  47. data/spec/rubocop/cops/if_with_semicolon_spec.rb +3 -3
  48. data/spec/rubocop/cops/indentation_spec.rb +7 -7
  49. data/spec/rubocop/cops/line_length_spec.rb +4 -4
  50. data/spec/rubocop/cops/method_and_variable_snake_case_spec.rb +47 -0
  51. data/spec/rubocop/cops/multiline_blocks_spec.rb +4 -4
  52. data/spec/rubocop/cops/multiline_if_then_spec.rb +7 -7
  53. data/spec/rubocop/cops/new_lambda_literal_spec.rb +23 -0
  54. data/spec/rubocop/cops/numeric_literals_spec.rb +10 -10
  55. data/spec/rubocop/cops/offence_spec.rb +4 -4
  56. data/spec/rubocop/cops/one_line_conditional_spec.rb +2 -3
  57. data/spec/rubocop/cops/parameter_lists_spec.rb +4 -4
  58. data/spec/rubocop/cops/parentheses_around_condition_spec.rb +64 -0
  59. data/spec/rubocop/cops/single_line_blocks_spec.rb +4 -4
  60. data/spec/rubocop/cops/space_after_colon_spec.rb +5 -5
  61. data/spec/rubocop/cops/space_after_comma_spec.rb +3 -3
  62. data/spec/rubocop/cops/space_after_semicolon_spec.rb +3 -3
  63. data/spec/rubocop/cops/space_around_braces_spec.rb +6 -6
  64. data/spec/rubocop/cops/space_around_equals_in_default_parameter_spec.rb +22 -0
  65. data/spec/rubocop/cops/space_around_operators_spec.rb +50 -25
  66. data/spec/rubocop/cops/space_inside_brackets_spec.rb +8 -8
  67. data/spec/rubocop/cops/space_inside_parens_spec.rb +4 -4
  68. data/spec/rubocop/cops/string_literals_spec.rb +5 -5
  69. data/spec/rubocop/cops/syntax_spec.rb +18 -0
  70. data/spec/rubocop/cops/tab_spec.rb +3 -3
  71. data/spec/rubocop/cops/ternary_operator_spec.rb +8 -8
  72. data/spec/rubocop/cops/trailing_whitespace_spec.rb +4 -4
  73. data/spec/rubocop/cops/unless_else_spec.rb +4 -4
  74. data/spec/rubocop/cops/when_then_spec.rb +5 -5
  75. data/spec/rubocop/reports/emacs_style_spec.rb +3 -3
  76. data/spec/rubocop/reports/report_spec.rb +5 -5
  77. data/spec/spec_helper.rb +6 -0
  78. metadata +57 -28
  79. data/.rbenv-version +0 -1
  80. data/.rvmrc +0 -1
  81. data/features/rubocop.feature +0 -9
  82. data/features/step_definitions/rubocop_steps.rb +0 -1
  83. data/features/support/env.rb +0 -15
@@ -5,13 +5,13 @@ require 'spec_helper'
5
5
  module Rubocop
6
6
  module Cop
7
7
  describe StringLiterals do
8
- let (:sl) { StringLiterals.new }
8
+ let(:sl) { StringLiterals.new }
9
9
 
10
10
  it 'registers an offence for double quotes when single quotes suffice' do
11
11
  inspect_source(sl, 'file.rb', ['s = "abc"'])
12
- sl.offences.map(&:message).should ==
12
+ expect(sl.offences.map(&:message)).to eq(
13
13
  ["Prefer single-quoted strings when you don't need string " +
14
- 'interpolation or special symbols.']
14
+ 'interpolation or special symbols.'])
15
15
  end
16
16
 
17
17
  it 'accepts double quotes when they are needed' do
@@ -19,13 +19,13 @@ module Rubocop
19
19
  'b = "#{encode_severity}:#{sprintf("%3d", line_number)}: #{m}"',
20
20
  'c = "\'"']
21
21
  inspect_source(sl, 'file.rb', src)
22
- sl.offences.map(&:message).should == []
22
+ expect(sl.offences.map(&:message)).to be_empty
23
23
  end
24
24
 
25
25
  it 'can handle double quotes within embedded expression' do
26
26
  src = ['"#{"A"}"']
27
27
  inspect_source(sl, 'file.rb', src)
28
- sl.offences.map(&:message).should == []
28
+ expect(sl.offences.map(&:message)).to be_empty
29
29
  end
30
30
  end
31
31
  end
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ module Rubocop
6
+ module Cop
7
+ describe Syntax do
8
+ let(:sc) { Syntax.new }
9
+
10
+ it 'registers an offence for unused variables', ruby: 2.0 do
11
+ sc.inspect('file.rb', ['x = 5', 'puts 10'], nil, nil)
12
+ expect(sc.offences.size).to eq(1)
13
+ expect(sc.offences.first.message)
14
+ .to eq('Assigned but unused variable - x')
15
+ end
16
+ end
17
+ end
18
+ end
@@ -5,16 +5,16 @@ require 'spec_helper'
5
5
  module Rubocop
6
6
  module Cop
7
7
  describe Tab do
8
- let (:tab) { Tab.new }
8
+ let(:tab) { Tab.new }
9
9
 
10
10
  it 'registers an offence for a line indented with tab' do
11
11
  tab.inspect('file.rb', ["\tx = 0"], nil, nil)
12
- tab.offences.size.should == 1
12
+ expect(tab.offences.size).to eq(1)
13
13
  end
14
14
 
15
15
  it 'accepts a line with tab in a string' do
16
16
  tab.inspect('file.rb', [%Q(x = "\t")], nil, nil)
17
- tab.offences.size.should == 0
17
+ expect(tab.offences).to be_empty
18
18
  end
19
19
  end
20
20
  end
@@ -5,30 +5,30 @@ require 'spec_helper'
5
5
  module Rubocop
6
6
  module Cop
7
7
  describe MultilineTernaryOperator do
8
- let (:op) { MultilineTernaryOperator.new }
8
+ let(:op) { MultilineTernaryOperator.new }
9
9
 
10
10
  it 'registers an offence for a multiline ternary operator expression' do
11
11
  inspect_source(op, 'file.rb', ['a = cond ?',
12
12
  ' b : c'])
13
- op.offences.map(&:message).should ==
13
+ expect(op.offences.map(&:message)).to eq(
14
14
  ['Avoid multi-line ?: (the ternary operator); use if/unless ' +
15
- 'instead.']
15
+ 'instead.'])
16
16
  end
17
17
 
18
18
  it 'accepts a single line ternary operator expression' do
19
19
  inspect_source(op, 'file.rb', ['a = cond ? b : c'])
20
- op.offences.map(&:message).should == []
20
+ expect(op.offences.map(&:message)).to be_empty
21
21
  end
22
22
  end
23
23
 
24
24
  describe NestedTernaryOperator do
25
- let (:op) { NestedTernaryOperator.new }
25
+ let(:op) { NestedTernaryOperator.new }
26
26
 
27
27
  it 'registers an offence for a nested ternary operator expression' do
28
28
  inspect_source(op, 'file.rb', ['a ? (b ? b1 : b2) : a2'])
29
- op.offences.map(&:message).should ==
29
+ expect(op.offences.map(&:message)).to eq(
30
30
  ['Ternary operators must not be nested. Prefer if/else constructs ' +
31
- 'instead.']
31
+ 'instead.'])
32
32
  end
33
33
 
34
34
  it 'accepts a non-nested ternary operator within an if' do
@@ -37,7 +37,7 @@ module Rubocop
37
37
  'else',
38
38
  ' d',
39
39
  'end'])
40
- op.offences.map(&:message).should == []
40
+ expect(op.offences.map(&:message)).to be_empty
41
41
  end
42
42
  end
43
43
  end
@@ -5,22 +5,22 @@ require 'spec_helper'
5
5
  module Rubocop
6
6
  module Cop
7
7
  describe TrailingWhitespace do
8
- let (:tws) { TrailingWhitespace.new }
8
+ let(:tws) { TrailingWhitespace.new }
9
9
 
10
10
  it 'registers an offence for a line ending with space' do
11
11
  source = ['x = 0 ']
12
12
  tws.inspect('file.rb', source, nil, nil)
13
- tws.offences.size.should == 1
13
+ expect(tws.offences.size).to eq(1)
14
14
  end
15
15
 
16
16
  it 'registers an offence for a line ending with tab' do
17
17
  tws.inspect('file.rb', ["x = 0\t"], nil, nil)
18
- tws.offences.size.should == 1
18
+ expect(tws.offences.size).to eq(1)
19
19
  end
20
20
 
21
21
  it 'accepts a line without trailing whitespace' do
22
22
  tws.inspect('file.rb', ["x = 0\n"], nil, nil)
23
- tws.offences.size.should == 0
23
+ expect(tws.offences).to be_empty
24
24
  end
25
25
  end
26
26
  end
@@ -5,7 +5,7 @@ require 'spec_helper'
5
5
  module Rubocop
6
6
  module Cop
7
7
  describe UnlessElse do
8
- let (:ue) { UnlessElse.new }
8
+ let(:ue) { UnlessElse.new }
9
9
 
10
10
  it 'registers an offence for an unless with else' do
11
11
  inspect_source(ue, 'file.rb', ['unless x',
@@ -13,16 +13,16 @@ module Rubocop
13
13
  'else',
14
14
  ' a = 0',
15
15
  'end'])
16
- ue.offences.map(&:message).should ==
16
+ expect(ue.offences.map(&:message)).to eq(
17
17
  ['Never use unless with else. Rewrite these with the ' +
18
- 'positive case first.']
18
+ 'positive case first.'])
19
19
  end
20
20
 
21
21
  it 'accepts an unless without else' do
22
22
  inspect_source(ue, 'file.rb', ['unless x',
23
23
  ' a = 1',
24
24
  'end'])
25
- ue.offences.map(&:message).should == []
25
+ expect(ue.offences.map(&:message)).to be_empty
26
26
  end
27
27
  end
28
28
  end
@@ -5,21 +5,21 @@ require 'spec_helper'
5
5
  module Rubocop
6
6
  module Cop
7
7
  describe WhenThen do
8
- let (:wt) { WhenThen.new }
8
+ let(:wt) { WhenThen.new }
9
9
 
10
10
  it 'registers an offence for when x;' do
11
11
  inspect_source(wt, 'file.rb', ['case a',
12
12
  'when b; c',
13
13
  'end'])
14
- wt.offences.map(&:message).should ==
15
- ['Never use "when x;". Use "when x then" instead.']
14
+ expect(wt.offences.map(&:message)).to eq(
15
+ ['Never use "when x;". Use "when x then" instead.'])
16
16
  end
17
17
 
18
18
  it 'accepts when x then' do
19
19
  inspect_source(wt, 'file.rb', ['case a',
20
20
  'when b then c',
21
21
  'end'])
22
- wt.offences.map(&:message).should == []
22
+ expect(wt.offences.map(&:message)).to be_empty
23
23
  end
24
24
 
25
25
  it 'accepts ; separating statements in the body of when' do
@@ -31,7 +31,7 @@ module Rubocop
31
31
  'when f',
32
32
  ' g; h',
33
33
  'end'])
34
- wt.offences.map(&:message).should == []
34
+ expect(wt.offences.map(&:message)).to be_empty
35
35
  end
36
36
  end
37
37
  end
@@ -6,7 +6,7 @@ require 'stringio'
6
6
  module Rubocop
7
7
  module Report
8
8
  describe EmacsStyle do
9
- let (:emacs_style) { Rubocop::Report.create('test', :emacs_style) }
9
+ let(:emacs_style) { Rubocop::Report.create('test', :emacs_style) }
10
10
 
11
11
  it 'displays parsable text' do
12
12
  cop = Cop::Cop.new
@@ -17,8 +17,8 @@ module Rubocop
17
17
 
18
18
  s = StringIO.new
19
19
  emacs_style.display(s)
20
- s.string.should == ['test:1: C: message 1',
21
- "test:11: F: message 2\n"].join("\n")
20
+ expect(s.string).to eq ['test:1: C: message 1',
21
+ "test:11: F: message 2\n"].join("\n")
22
22
  end
23
23
  end
24
24
  end
@@ -5,14 +5,14 @@ require 'spec_helper'
5
5
  module Rubocop
6
6
  module Report
7
7
  describe Report do
8
- let (:report) { Report.new('test') }
8
+ let(:report) { Report.new('test') }
9
9
 
10
10
  it 'initially has 0 entries' do
11
- report.entries.size.should == 0
11
+ expect(report.entries.size).to be_zero
12
12
  end
13
13
 
14
14
  it 'initially has nothing to report' do
15
- report.empty?.should be_true
15
+ expect(report.empty?).to be_true
16
16
  end
17
17
 
18
18
  it 'keeps track of offences' do
@@ -21,8 +21,8 @@ module Rubocop
21
21
 
22
22
  report << cop
23
23
 
24
- report.empty?.should be_false
25
- report.entries.size.should == 1
24
+ expect(report.empty?).to be_false
25
+ expect(report.entries.size).to eq(1)
26
26
  end
27
27
  end
28
28
  end
data/spec/spec_helper.rb CHANGED
@@ -40,6 +40,12 @@ module ExitCodeMatchers
40
40
  end
41
41
 
42
42
  RSpec.configure do |config|
43
+ config.filter_run_excluding ruby: ->(v) { !RUBY_VERSION.start_with?(v.to_s) }
44
+
45
+ config.expect_with :rspec do |c|
46
+ c.syntax = :expect # disables `should`
47
+ end
48
+
43
49
  config.include(ExitCodeMatchers)
44
50
  end
45
51
 
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.3.0
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,88 +9,104 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-11 00:00:00.000000000 Z
12
+ date: 2013-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: term-ansicolor
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: rake
16
32
  requirement: !ruby/object:Gem::Requirement
17
33
  none: false
18
34
  requirements:
19
- - - ~>
35
+ - - ! '>='
20
36
  - !ruby/object:Gem::Version
21
- version: 10.0.0
37
+ version: '0'
22
38
  type: :development
23
39
  prerelease: false
24
40
  version_requirements: !ruby/object:Gem::Requirement
25
41
  none: false
26
42
  requirements:
27
- - - ~>
43
+ - - ! '>='
28
44
  - !ruby/object:Gem::Version
29
- version: 10.0.0
45
+ version: '0'
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: rspec
32
48
  requirement: !ruby/object:Gem::Requirement
33
49
  none: false
34
50
  requirements:
35
- - - ~>
51
+ - - ! '>='
36
52
  - !ruby/object:Gem::Version
37
- version: 2.12.0
53
+ version: '0'
38
54
  type: :development
39
55
  prerelease: false
40
56
  version_requirements: !ruby/object:Gem::Requirement
41
57
  none: false
42
58
  requirements:
43
- - - ~>
59
+ - - ! '>='
44
60
  - !ruby/object:Gem::Version
45
- version: 2.12.0
61
+ version: '0'
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: yard
48
64
  requirement: !ruby/object:Gem::Requirement
49
65
  none: false
50
66
  requirements:
51
- - - ~>
67
+ - - ! '>='
52
68
  - !ruby/object:Gem::Version
53
- version: 0.8.0
69
+ version: '0'
54
70
  type: :development
55
71
  prerelease: false
56
72
  version_requirements: !ruby/object:Gem::Requirement
57
73
  none: false
58
74
  requirements:
59
- - - ~>
75
+ - - ! '>='
60
76
  - !ruby/object:Gem::Version
61
- version: 0.8.0
77
+ version: '0'
62
78
  - !ruby/object:Gem::Dependency
63
79
  name: bundler
64
80
  requirement: !ruby/object:Gem::Requirement
65
81
  none: false
66
82
  requirements:
67
- - - ~>
83
+ - - ! '>='
68
84
  - !ruby/object:Gem::Version
69
- version: 1.2.0
85
+ version: '0'
70
86
  type: :development
71
87
  prerelease: false
72
88
  version_requirements: !ruby/object:Gem::Requirement
73
89
  none: false
74
90
  requirements:
75
- - - ~>
91
+ - - ! '>='
76
92
  - !ruby/object:Gem::Version
77
- version: 1.2.0
93
+ version: '0'
78
94
  - !ruby/object:Gem::Dependency
79
95
  name: jeweler
80
96
  requirement: !ruby/object:Gem::Requirement
81
97
  none: false
82
98
  requirements:
83
- - - ~>
99
+ - - ! '>='
84
100
  - !ruby/object:Gem::Version
85
- version: 1.8.3
101
+ version: '0'
86
102
  type: :development
87
103
  prerelease: false
88
104
  version_requirements: !ruby/object:Gem::Requirement
89
105
  none: false
90
106
  requirements:
91
- - - ~>
107
+ - - ! '>='
92
108
  - !ruby/object:Gem::Version
93
- version: 1.8.3
109
+ version: '0'
94
110
  - !ruby/object:Gem::Dependency
95
111
  name: simplecov
96
112
  requirement: !ruby/object:Gem::Requirement
@@ -118,10 +134,8 @@ extra_rdoc_files:
118
134
  - README.md
119
135
  files:
120
136
  - .document
121
- - .rbenv-version
122
137
  - .rspec
123
138
  - .rubocop.yml
124
- - .rvmrc
125
139
  - .travis.yml
126
140
  - CONTRIBUTING.md
127
141
  - Gemfile
@@ -131,30 +145,35 @@ files:
131
145
  - Rakefile
132
146
  - VERSION
133
147
  - bin/rubocop
134
- - features/rubocop.feature
135
- - features/step_definitions/rubocop_steps.rb
136
- - features/support/env.rb
137
148
  - lib/rubocop.rb
138
149
  - lib/rubocop/cli.rb
139
150
  - lib/rubocop/cop/align_parameters.rb
140
151
  - lib/rubocop/cop/ampersands_pipes_vs_and_or.rb
141
152
  - lib/rubocop/cop/blocks.rb
153
+ - lib/rubocop/cop/class_and_module_camel_case.rb
154
+ - lib/rubocop/cop/collection_methods.rb
142
155
  - lib/rubocop/cop/cop.rb
143
156
  - lib/rubocop/cop/def_parentheses.rb
144
157
  - lib/rubocop/cop/empty_lines.rb
145
158
  - lib/rubocop/cop/encoding.rb
146
159
  - lib/rubocop/cop/end_of_line.rb
160
+ - lib/rubocop/cop/favor_modifier.rb
161
+ - lib/rubocop/cop/favor_unless_over_negated_if.rb
147
162
  - lib/rubocop/cop/grammar.rb
148
163
  - lib/rubocop/cop/hash_syntax.rb
149
164
  - lib/rubocop/cop/if_then_else.rb
150
165
  - lib/rubocop/cop/indentation.rb
151
166
  - lib/rubocop/cop/line_length.rb
167
+ - lib/rubocop/cop/method_and_variable_snake_case.rb
168
+ - lib/rubocop/cop/new_lambda_literal.rb
152
169
  - lib/rubocop/cop/numeric_literals.rb
153
170
  - lib/rubocop/cop/offence.rb
154
171
  - lib/rubocop/cop/parameter_lists.rb
172
+ - lib/rubocop/cop/parentheses_around_condition.rb
155
173
  - lib/rubocop/cop/space_after_comma_etc.rb
156
174
  - lib/rubocop/cop/string_literals.rb
157
175
  - lib/rubocop/cop/surrounding_space.rb
176
+ - lib/rubocop/cop/syntax.rb
158
177
  - lib/rubocop/cop/tab.rb
159
178
  - lib/rubocop/cop/ternary_operator.rb
160
179
  - lib/rubocop/cop/trailing_whitespace.rb
@@ -168,32 +187,42 @@ files:
168
187
  - spec/rubocop/cli_spec.rb
169
188
  - spec/rubocop/cops/align_parameters_spec.rb
170
189
  - spec/rubocop/cops/ampersands_pipes_vs_and_or_spec.rb
190
+ - spec/rubocop/cops/class_and_module_camel_case_spec.rb
191
+ - spec/rubocop/cops/collection_methods_spec.rb
171
192
  - spec/rubocop/cops/cop_spec.rb
172
193
  - spec/rubocop/cops/def_with_parentheses_spec.rb
173
194
  - spec/rubocop/cops/def_without_parentheses_spec.rb
174
195
  - spec/rubocop/cops/empty_lines_spec.rb
175
196
  - spec/rubocop/cops/encoding_spec.rb
176
197
  - spec/rubocop/cops/end_of_line_spec.rb
198
+ - spec/rubocop/cops/favor_modifier_spec.rb
199
+ - spec/rubocop/cops/favor_unless_over_negated_if_spec.rb
200
+ - spec/rubocop/cops/favor_until_over_negated_while_spec.rb
177
201
  - spec/rubocop/cops/grammar_spec.rb
178
202
  - spec/rubocop/cops/hash_syntax_spec.rb
179
203
  - spec/rubocop/cops/if_with_semicolon_spec.rb
180
204
  - spec/rubocop/cops/indentation_spec.rb
181
205
  - spec/rubocop/cops/line_length_spec.rb
206
+ - spec/rubocop/cops/method_and_variable_snake_case_spec.rb
182
207
  - spec/rubocop/cops/multiline_blocks_spec.rb
183
208
  - spec/rubocop/cops/multiline_if_then_spec.rb
209
+ - spec/rubocop/cops/new_lambda_literal_spec.rb
184
210
  - spec/rubocop/cops/numeric_literals_spec.rb
185
211
  - spec/rubocop/cops/offence_spec.rb
186
212
  - spec/rubocop/cops/one_line_conditional_spec.rb
187
213
  - spec/rubocop/cops/parameter_lists_spec.rb
214
+ - spec/rubocop/cops/parentheses_around_condition_spec.rb
188
215
  - spec/rubocop/cops/single_line_blocks_spec.rb
189
216
  - spec/rubocop/cops/space_after_colon_spec.rb
190
217
  - spec/rubocop/cops/space_after_comma_spec.rb
191
218
  - spec/rubocop/cops/space_after_semicolon_spec.rb
192
219
  - spec/rubocop/cops/space_around_braces_spec.rb
220
+ - spec/rubocop/cops/space_around_equals_in_default_parameter_spec.rb
193
221
  - spec/rubocop/cops/space_around_operators_spec.rb
194
222
  - spec/rubocop/cops/space_inside_brackets_spec.rb
195
223
  - spec/rubocop/cops/space_inside_parens_spec.rb
196
224
  - spec/rubocop/cops/string_literals_spec.rb
225
+ - spec/rubocop/cops/syntax_spec.rb
197
226
  - spec/rubocop/cops/tab_spec.rb
198
227
  - spec/rubocop/cops/ternary_operator_spec.rb
199
228
  - spec/rubocop/cops/trailing_whitespace_spec.rb
@@ -217,7 +246,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
246
  version: '0'
218
247
  segments:
219
248
  - 0
220
- hash: 1293678541270492107
249
+ hash: 1039361930821170753
221
250
  required_rubygems_version: !ruby/object:Gem::Requirement
222
251
  none: false
223
252
  requirements:
data/.rbenv-version DELETED
@@ -1 +0,0 @@
1
- 1.9.3-p327
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use --create 1.9.3@rubocop
@@ -1,9 +0,0 @@
1
- Feature: something something
2
- In order to something something
3
- A user something something
4
- something something something
5
-
6
- Scenario: something something
7
- Given inspiration
8
- When I create a sweet new gem
9
- Then everyone should see how awesome I am
@@ -1 +0,0 @@
1
- # encoding: utf-8
@@ -1,15 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'bundler'
4
- begin
5
- Bundler.setup(:default, :development)
6
- rescue Bundler::BundlerError => e
7
- $stderr.puts e.message
8
- $stderr.puts 'Run `bundle install` to install missing gems'
9
- exit e.status_code
10
- end
11
-
12
- $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
13
- require 'rubocop'
14
-
15
- require 'rspec/expectations'