]> git.openstreetmap.org Git - chef.git/commitdiff
Replace foodcritic and rubocop with cookstyle
authorTom Hughes <tom@compton.nu>
Mon, 9 Sep 2019 17:57:49 +0000 (18:57 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 9 Sep 2019 18:13:27 +0000 (19:13 +0100)
.rubocop.yml
.rubocop_todo.yml
.travis.yml
Gemfile
Gemfile.lock

index f5d3d4c19bf1ac03803fe9c3112f14a2e765dc87..dfd51c01e2c089ba5a6a7130a5fff9528eaf3bd6 100644 (file)
@@ -1,7 +1,5 @@
 inherit_from: .rubocop_todo.yml
 
 inherit_from: .rubocop_todo.yml
 
-require: rubocop-performance
-
 AllCops:
   TargetRubyVersion: 2.3
 
 AllCops:
   TargetRubyVersion: 2.3
 
@@ -15,28 +13,33 @@ Layout/ExtraSpacing:
 Layout/IndentHeredoc:
   EnforcedStyle: squiggly
 
 Layout/IndentHeredoc:
   EnforcedStyle: squiggly
 
-Naming/FileName:
-  Exclude:
-    - 'cookbooks/trac/files/default/trac-authenticate'
-    - 'cookbooks/planet/files/default/replication-bin/replicate-changesets'
-    - 'cookbooks/*/templates/*/*.erb'
-    - 'hooks/*'
-    - 'roles/*.rb'
-
 Naming/UncommunicativeMethodParamName:
   Enabled: false
 
 Naming/UncommunicativeMethodParamName:
   Enabled: false
 
-Style/FrozenStringLiteralComment:
-  EnforcedStyle: never
-
 Style/HashSyntax:
   EnforcedStyle: hash_rockets
 
 Style/IfUnlessModifier:
   Enabled: false
 
 Style/HashSyntax:
   EnforcedStyle: hash_rockets
 
 Style/IfUnlessModifier:
   Enabled: false
 
+Style/NumericPredicate:
+  EnforcedStyle: predicate
+
+Style/PercentLiteralDelimiters:
+  PreferredDelimiters:
+    '%i': '[]'
+    '%I': '[]'
+    '%w': '[]'
+    '%W': '[]'
+
 Style/StringLiterals:
   EnforcedStyle: double_quotes
 
 Style/SymbolArray:
   EnforcedStyle: brackets
 Style/StringLiterals:
   EnforcedStyle: double_quotes
 
 Style/SymbolArray:
   EnforcedStyle: brackets
+
+Style/TrailingCommaInArrayLiteral:
+  Enabled: false
+
+Style/TrailingCommaInHashLiteral:
+  Enabled: false
index 3002b6a10a47f0473ab6eaa9d78a80c4f1b3fffd..2e911812f89b16fc5ad39697ec81b2c149ed986a 100644 (file)
@@ -1,77 +1,58 @@
 # This configuration was generated by
 # `rubocop --auto-gen-config`
 # This configuration was generated by
 # `rubocop --auto-gen-config`
-# on 2016-10-20 21:45:03 +0100 using RuboCop version 0.44.1.
+# on 2019-09-09 18:59:09 +0100 using RuboCop version 0.72.0.
 # The point is for the user to remove these configuration records
 # one by one as the offenses are removed from the code base.
 # Note that changes in the inspected code, or installation of new
 # versions of RuboCop, may require this file to be generated again.
 
 # The point is for the user to remove these configuration records
 # one by one as the offenses are removed from the code base.
 # Note that changes in the inspected code, or installation of new
 # versions of RuboCop, may require this file to be generated again.
 
-# Offense count: 22
-Metrics/AbcSize:
-  Max: 57
-
-# Offense count: 27
-# Configuration parameters: CountComments.
-Metrics/BlockLength:
-  Max: 372
-
-Metrics/BlockNesting:
-  Max: 4
-
-# Offense count: 3
-Metrics/CyclomaticComplexity:
-  Max: 8
-
-# Offense count: 475
-# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives.
-# URISchemes: http, https
-Metrics/LineLength:
-  Max: 704
-
-# Offense count: 24
-# Configuration parameters: CountComments.
-Metrics/MethodLength:
-  Max: 24
+# Offense count: 14
+ChefCorrectness/NodeNormal:
+  Exclude:
+    - '**/metadata.rb'
+    - 'cookbooks/dev/recipes/default.rb'
+    - 'cookbooks/mediawiki/resources/site.rb'
+    - 'cookbooks/networking/recipes/default.rb'
+    - 'cookbooks/openvpn/recipes/default.rb'
+    - 'cookbooks/web/recipes/backend.rb'
+    - 'cookbooks/wordpress/resources/site.rb'
+
+# Offense count: 12
+ChefCorrectness/NodeNormalUnless:
+  Exclude:
+    - '**/metadata.rb'
+    - 'cookbooks/mailman/recipes/default.rb'
+    - 'cookbooks/mediawiki/resources/site.rb'
+    - 'cookbooks/wordpress/resources/site.rb'
 
 
-# Offense count: 1
-Metrics/PerceivedComplexity:
-  Max: 9
+# Offense count: 78
+# Cop supports --auto-correct.
+# Configuration parameters: Include.
+# Include: **/metadata.rb
+ChefDeprecations/LongDescriptionMetadata:
+  Enabled: false
 
 
-# Offense count: 13
-Style/Documentation:
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: Include.
+# Include: **/resources/*.rb, **/providers/*.rb
+ChefModernize/IncludingMixinShelloutInResources:
   Exclude:
   Exclude:
-    - 'spec/**/*'
-    - 'test/**/*'
-    - 'cookbooks/chef/libraries/compare_versions.rb'
-    - 'cookbooks/chef/libraries/edit_file.rb'
-    - 'cookbooks/chef/libraries/random_password.rb'
-    - 'cookbooks/chef/libraries/subversion.rb'
-    - 'cookbooks/hardware/libraries/sensors.rb'
-    - 'cookbooks/munin/libraries/expand.rb'
-    - 'cookbooks/mysql/libraries/mysql.rb'
-    - 'cookbooks/networking/libraries/interfaces.rb'
-    - 'cookbooks/networking/libraries/ipaddresses.rb'
-    - 'cookbooks/postgresql/libraries/postgresql.rb'
-    - 'cookbooks/tile/files/default/ruby/expire.rb'
-    - 'cookbooks/wordpress/libraries/wordpress.rb'
+    - 'cookbooks/nodejs/resources/package.rb'
 
 
-# Offense count: 14
+# Offense count: 947
 # Cop supports --auto-correct.
 # Cop supports --auto-correct.
-# Configuration parameters: MaxLineLength.
-Style/IfUnlessModifier:
-  Exclude:
-    - 'cookbooks/accounts/recipes/default.rb'
-    - 'cookbooks/apache/providers/module.rb'
-    - 'cookbooks/chef/libraries/compare_versions.rb'
-    - 'cookbooks/exim/recipes/default.rb'
-    - 'cookbooks/hardware/attributes/default.rb'
-    - 'cookbooks/hardware/recipes/default.rb'
-    - 'cookbooks/munin/recipes/default.rb'
-    - 'cookbooks/nodejs/recipes/default.rb'
-    - 'cookbooks/tile/files/default/ruby/expire.rb'
-    - 'cookbooks/tools/recipes/default.rb'
+# Configuration parameters: .
+# SupportedStyles: strings, symbols
+ChefStyle/AttributeKeys:
+  EnforcedStyle: symbols
+
+# Offense count: 297
+# Cop supports --auto-correct.
+ChefStyle/CommentFormat:
+  Enabled: false
 
 
-# Offense count: 37
+# Offense count: 466
 # Cop supports --auto-correct.
 # Cop supports --auto-correct.
-Style/NumericLiterals:
-  MinDigits: 11
+ChefStyle/FileMode:
+  Enabled: false
index afe9a2cebaf8c2510d954e8adbb2faee011405ab..87e77d6c7922340892c0106e151e4b1c0900a7eb 100644 (file)
@@ -2,5 +2,4 @@ sudo: false
 language: ruby
 cache: bundler
 script:
 language: ruby
 cache: bundler
 script:
-  - bundle exec rubocop -f fuubar
-  - bundle exec foodcritic -f any cookbooks
+  - bundle exec cookstyle -f fuubar
diff --git a/Gemfile b/Gemfile
index 078ade7b28208ecb54a275e5674974853b47f491..ddf1c6b1cab9ab4372204993ddcb4570689bc5e1 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -1,8 +1,6 @@
 source "https://rubygems.org"
 
 source "https://rubygems.org"
 
-gem "foodcritic"
+gem "cookstyle"
 gem "kitchen-vagrant"
 gem "kitchen-vagrant"
-gem "rubocop"
-gem "rubocop-performance"
 gem "serverspec"
 gem "test-kitchen"
 gem "serverspec"
 gem "test-kitchen"
index 7dbaf4e58206e841e6fb2e112fb256a980e532e0..87a88b2fed1612785a8b8e77af56a39f7794f000 100644 (file)
@@ -2,30 +2,15 @@ GEM
   remote: https://rubygems.org/
   specs:
     ast (2.4.0)
   remote: https://rubygems.org/
   specs:
     ast (2.4.0)
-    backports (3.15.0)
     bcrypt_pbkdf (1.0.1)
     builder (3.2.3)
     bcrypt_pbkdf (1.0.1)
     builder (3.2.3)
-    cucumber-core (3.2.1)
-      backports (>= 3.8.0)
-      cucumber-tag_expressions (~> 1.1.0)
-      gherkin (~> 5.0)
-    cucumber-tag_expressions (1.1.1)
+    cookstyle (5.5.7)
+      rubocop (= 0.72.0)
     diff-lcs (1.3)
     ed25519 (1.2.4)
     equatable (0.6.1)
     erubis (2.7.0)
     ffi (1.11.1)
     diff-lcs (1.3)
     ed25519 (1.2.4)
     equatable (0.6.1)
     erubis (2.7.0)
     ffi (1.11.1)
-    ffi-yajl (2.3.1)
-      libyajl2 (~> 1.2)
-    foodcritic (16.1.1)
-      cucumber-core (>= 1.3, < 4.0)
-      erubis
-      ffi-yajl (~> 2.0)
-      nokogiri (>= 1.5, < 2.0)
-      rake
-      rufus-lru (~> 1.0)
-      treetop (~> 1.4)
-    gherkin (5.1.0)
     gssapi (1.3.0)
       ffi (>= 1.0.1)
     gyoku (1.3.1)
     gssapi (1.3.0)
       ffi (>= 1.0.1)
     gyoku (1.3.1)
@@ -34,7 +19,6 @@ GEM
     jaro_winkler (1.5.3)
     kitchen-vagrant (1.6.0)
       test-kitchen (>= 1.4, < 3)
     jaro_winkler (1.5.3)
     kitchen-vagrant (1.6.0)
       test-kitchen (>= 1.4, < 3)
-    libyajl2 (1.2.0)
     license-acceptance (1.0.13)
       pastel (~> 0.7)
       tomlrb (~> 1.2)
     license-acceptance (1.0.13)
       pastel (~> 0.7)
       tomlrb (~> 1.2)
@@ -44,12 +28,11 @@ GEM
     logging (2.2.2)
       little-plugger (~> 1.1)
       multi_json (~> 1.10)
     logging (2.2.2)
       little-plugger (~> 1.1)
       multi_json (~> 1.10)
-    mini_portile2 (2.4.0)
-    mixlib-install (3.11.18)
+    mixlib-install (3.11.21)
       mixlib-shellout
       mixlib-versioning
       thor
       mixlib-shellout
       mixlib-versioning
       thor
-    mixlib-shellout (2.4.4)
+    mixlib-shellout (3.0.7)
     mixlib-versioning (1.2.7)
     multi_json (1.13.1)
     necromancer (0.5.0)
     mixlib-versioning (1.2.7)
     multi_json (1.13.1)
     necromancer (0.5.0)
@@ -59,18 +42,14 @@ GEM
     net-ssh-gateway (2.0.0)
       net-ssh (>= 4.0.0)
     net-telnet (0.1.1)
     net-ssh-gateway (2.0.0)
       net-ssh (>= 4.0.0)
     net-telnet (0.1.1)
-    nokogiri (1.10.4)
-      mini_portile2 (~> 2.4.0)
     nori (2.6.0)
     parallel (1.17.0)
     nori (2.6.0)
     parallel (1.17.0)
-    parser (2.6.3.0)
+    parser (2.6.4.0)
       ast (~> 2.4.0)
     pastel (0.7.3)
       equatable (~> 0.6)
       tty-color (~> 0.5)
       ast (~> 2.4.0)
     pastel (0.7.3)
       equatable (~> 0.6)
       tty-color (~> 0.5)
-    polyglot (0.3.5)
     rainbow (3.0.0)
     rainbow (3.0.0)
-    rake (12.3.3)
     rspec (3.8.0)
       rspec-core (~> 3.8.0)
       rspec-expectations (~> 3.8.0)
     rspec (3.8.0)
       rspec-core (~> 3.8.0)
       rspec-expectations (~> 3.8.0)
@@ -87,19 +66,16 @@ GEM
       diff-lcs (>= 1.2.0, < 2.0)
       rspec-support (~> 3.8.0)
     rspec-support (3.8.2)
       diff-lcs (>= 1.2.0, < 2.0)
       rspec-support (~> 3.8.0)
     rspec-support (3.8.2)
-    rubocop (0.74.0)
+    rubocop (0.72.0)
       jaro_winkler (~> 1.5.1)
       parallel (~> 1.10)
       parser (>= 2.6)
       rainbow (>= 2.2.2, < 4.0)
       ruby-progressbar (~> 1.7)
       unicode-display_width (>= 1.4.0, < 1.7)
       jaro_winkler (~> 1.5.1)
       parallel (~> 1.10)
       parser (>= 2.6)
       rainbow (>= 2.2.2, < 4.0)
       ruby-progressbar (~> 1.7)
       unicode-display_width (>= 1.4.0, < 1.7)
-    rubocop-performance (1.4.1)
-      rubocop (>= 0.71.0)
     ruby-progressbar (1.10.1)
     rubyntlm (0.6.2)
     ruby-progressbar (1.10.1)
     rubyntlm (0.6.2)
-    rubyzip (1.2.3)
-    rufus-lru (1.1.0)
+    rubyzip (1.2.4)
     serverspec (2.41.5)
       multi_json
       rspec (~> 3.0)
     serverspec (2.41.5)
       multi_json
       rspec (~> 3.0)
@@ -111,17 +87,17 @@ GEM
       net-ssh (>= 2.7)
       net-telnet (= 0.1.1)
       sfl
       net-ssh (>= 2.7)
       net-telnet (= 0.1.1)
       sfl
-    strings (0.1.5)
+    strings (0.1.6)
       strings-ansi (~> 0.1)
       unicode-display_width (~> 1.5)
       unicode_utils (~> 1.4)
     strings-ansi (0.1.0)
       strings-ansi (~> 0.1)
       unicode-display_width (~> 1.5)
       unicode_utils (~> 1.4)
     strings-ansi (0.1.0)
-    test-kitchen (2.2.5)
+    test-kitchen (2.3.2)
       bcrypt_pbkdf (~> 1.0)
       ed25519 (~> 1.2)
       license-acceptance (~> 1.0, >= 1.0.11)
       mixlib-install (~> 3.6)
       bcrypt_pbkdf (~> 1.0)
       ed25519 (~> 1.2)
       license-acceptance (~> 1.0, >= 1.0.11)
       mixlib-install (~> 3.6)
-      mixlib-shellout (>= 1.2, < 3.0)
+      mixlib-shellout (>= 1.2, < 4.0)
       net-scp (>= 1.1, < 3.0)
       net-ssh (>= 2.9, < 6.0)
       net-ssh-gateway (>= 1.2, < 3.0)
       net-scp (>= 1.1, < 3.0)
       net-ssh (>= 2.9, < 6.0)
       net-ssh-gateway (>= 1.2, < 3.0)
@@ -131,11 +107,9 @@ GEM
       winrm-fs (~> 1.1)
     thor (0.20.3)
     tomlrb (1.2.8)
       winrm-fs (~> 1.1)
     thor (0.20.3)
     tomlrb (1.2.8)
-    treetop (1.6.10)
-      polyglot (~> 0.3)
-    tty-box (0.4.0)
+    tty-box (0.4.1)
       pastel (~> 0.7.2)
       pastel (~> 0.7.2)
-      strings (~> 0.1.5)
+      strings (~> 0.1.6)
       tty-cursor (~> 0.7)
     tty-color (0.5.0)
     tty-cursor (0.7.0)
       tty-cursor (~> 0.7)
     tty-color (0.5.0)
     tty-cursor (0.7.0)
@@ -173,10 +147,8 @@ PLATFORMS
   ruby
 
 DEPENDENCIES
   ruby
 
 DEPENDENCIES
-  foodcritic
+  cookstyle
   kitchen-vagrant
   kitchen-vagrant
-  rubocop
-  rubocop-performance
   serverspec
   test-kitchen
 
   serverspec
   test-kitchen