Browse Source

Upgrade/Update rubocop

Now that almost all of the rubocop blueprints have been completed, make
one final pass through all of the cookbooks ensuring they're all in
sync with each other.

- Upgrade rubocop to 0.18.1
- Fix violations caused by 0.18.1 upgrade
- Add Includes for non-existent folders to Includes so they
  automatically cover future additions

Change-Id: I9224b785f50103d348e3b16ea24e5dc8cab84c62
Implements: blueprint lint-and-unit-testing-for-havana
tags/eol-havana
Christopher H. Laco 5 years ago
parent
commit
ef8c535cc8
6 changed files with 19 additions and 12 deletions
  1. 8
    2
      .rubocop.yml
  2. 1
    1
      Gemfile
  3. 7
    6
      Gemfile.lock
  4. 1
    1
      recipes/api.rb
  5. 1
    1
      recipes/cinder-common.rb
  6. 1
    1
      recipes/volume.rb

+ 8
- 2
.rubocop.yml View File

@@ -3,13 +3,19 @@ AllCops:
3 3
     - metadata.rb
4 4
     - Gemfile
5 5
     - attributes/**
6
+    - libraries/**
7
+    - providers/**
6 8
     - recipes/**
9
+    - resources/**
7 10
     - spec/**
8 11
 
9
-# ignore long lines
12
+Encoding:
13
+  Exclude:
14
+    - metadata.rb
15
+    - Gemfile
16
+
10 17
 LineLength:
11 18
   Enabled: false
12 19
 
13
-# Allow small arrays before forcing  %w or %W
14 20
 WordArray:
15 21
   MinSize: 3

+ 1
- 1
Gemfile View File

@@ -7,4 +7,4 @@ gem 'berkshelf', '~> 2.0.10'
7 7
 gem 'chefspec', '~> 3.1.4'
8 8
 gem 'foodcritic', '~> 3.0.3'
9 9
 gem 'strainer'
10
-gem 'rubocop', '>= 0.16.0'
10
+gem 'rubocop', '~> 0.18.1'

+ 7
- 6
Gemfile.lock View File

@@ -135,7 +135,7 @@ GEM
135 135
       mixlib-shellout
136 136
       systemu (~> 2.5.2)
137 137
       yajl-ruby
138
-    parser (2.1.2)
138
+    parser (2.1.4)
139 139
       ast (~> 1.1)
140 140
       slop (~> 3.4, >= 3.4.5)
141 141
     polyglot (0.3.3)
@@ -147,7 +147,7 @@ GEM
147 147
     puma (1.6.3)
148 148
       rack (~> 1.2)
149 149
     rack (1.5.2)
150
-    rainbow (1.99.1)
150
+    rainbow (2.0.0)
151 151
     rake (10.1.1)
152 152
     rbzip2 (0.2.0)
153 153
     rest-client (1.6.7)
@@ -181,10 +181,11 @@ GEM
181 181
     rspec-expectations (2.14.4)
182 182
       diff-lcs (>= 1.1.3, < 2.0)
183 183
     rspec-mocks (2.14.4)
184
-    rubocop (0.16.0)
185
-      parser (~> 2.1)
184
+    rubocop (0.18.1)
185
+      json (>= 1.7.7, < 2)
186
+      parser (~> 2.1.3)
186 187
       powerpack (~> 0.0.6)
187
-      rainbow (>= 1.1.4)
188
+      rainbow (>= 1.99.1, < 3.0)
188 189
     rubyntlm (0.1.1)
189 190
     savon (0.9.5)
190 191
       akami (~> 1.0)
@@ -230,5 +231,5 @@ DEPENDENCIES
230 231
   chefspec (~> 3.1.4)
231 232
   foodcritic (~> 3.0.3)
232 233
   json (<= 1.7.7)
233
-  rubocop (>= 0.16.0)
234
+  rubocop (~> 0.18.1)
234 235
   strainer

+ 1
- 1
recipes/api.rb View File

@@ -21,7 +21,7 @@
21 21
 # limitations under the License.
22 22
 #
23 23
 
24
-class ::Chef::Recipe
24
+class ::Chef::Recipe # rubocop:disable Documentation
25 25
   include ::Openstack
26 26
 end
27 27
 

+ 1
- 1
recipes/cinder-common.rb View File

@@ -13,7 +13,7 @@
13 13
 # limitations under the License.
14 14
 #
15 15
 
16
-class ::Chef::Recipe
16
+class ::Chef::Recipe # rubocop:disable Documentation
17 17
   include ::Openstack
18 18
 end
19 19
 

+ 1
- 1
recipes/volume.rb View File

@@ -22,7 +22,7 @@
22 22
 # limitations under the License.
23 23
 #
24 24
 
25
-class ::Chef::Recipe
25
+class ::Chef::Recipe # rubocop:disable Documentation
26 26
   include ::Openstack
27 27
 end
28 28
 

Loading…
Cancel
Save