Skip to content

Commit

Permalink
Merge pull request #68 from chef/lcg/rubocop-0.62
Browse files Browse the repository at this point in the history
rubocop 0.62 engine upgrade
  • Loading branch information
lamont-granquist authored Jan 15, 2019
2 parents a50697a + 73506f9 commit ec1c760
Show file tree
Hide file tree
Showing 10 changed files with 2,953 additions and 2,592 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ bundler_args: --jobs 7 --without docs debug
before_install: gem install bundler -v 1.10.6

rvm:
- 2.2.10
- 2.3.8
- 2.4.5
- 2.5.3
Expand Down
4 changes: 1 addition & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ task :vendor do

mkdir_p dst
cp(src.join("default.yml"), dst.join("upstream.yml"))
cp(src.join("enabled.yml"), dst.join("enabled.yml"))
cp(src.join("disabled.yml"), dst.join("disabled.yml"))

require "rubocop"
require "yaml"
cfg = RuboCop::Cop::Cop.all.inject({}) { |acc, cop| acc[cop.cop_name] = { "Enabled" => false }; acc }
File.open(dst.join("disable_all.yml"), "w") { |fh| fh.write cfg.to_yaml }

sh %{git add #{dst}/{upstream,enabled,disabled,disable_all}.yml}
sh %{git add #{dst}/{upstream,disable_all}.yml}
sh %{git commit -m "Vendor rubocop-#{upstream.version} upstream configuration."}
end

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.3
0.12.0
4 changes: 2 additions & 2 deletions bin/chefstyle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib])
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w{.. lib})

require "chefstyle"

if ARGV.size == 1 && %w[-v --version].include?(ARGV.first)
if ARGV.size == 1 && %w{-v --version}.include?(ARGV.first)
puts "Chefstyle #{Chefstyle::VERSION}"
print " * RuboCop "
end
Expand Down
10 changes: 5 additions & 5 deletions chefstyle.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'chefstyle/version'
require "chefstyle/version"

Gem::Specification.new do |spec|
spec.name = "chefstyle"
Expand All @@ -12,10 +12,10 @@ Gem::Specification.new do |spec|
spec.summary = %q{Rubocop configuration for Chef's ruby projects}
spec.homepage = "https://github.com/chef/chefstyle"
spec.license = "Apache-2.0"
spec.required_ruby_version = ">= 2.2"
spec.required_ruby_version = ">= 2.3"

spec.files = %w{LICENSE chefstyle.gemspec Gemfile} + Dir.glob("{bin,config,lib}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
spec.executables = %w[chefstyle]
spec.files = %w{LICENSE chefstyle.gemspec Gemfile} + Dir.glob("{bin,config,lib}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
spec.executables = %w{chefstyle}
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler"
Expand Down
50 changes: 41 additions & 9 deletions config/disable_all.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
Bundler/DuplicatedGem:
Enabled: false
Bundler/GemComment:
Enabled: false
Bundler/InsecureProtocolSource:
Enabled: false
Bundler/OrderedGems:
Expand All @@ -27,6 +29,8 @@ Layout/CaseIndentation:
Enabled: false
Layout/ClassStructure:
Enabled: false
Layout/ClosingHeredocIndentation:
Enabled: false
Layout/ClosingParenthesisIndentation:
Enabled: false
Layout/CommentIndentation:
Expand All @@ -41,6 +45,8 @@ Layout/ElseAlignment:
Enabled: false
Layout/EmptyComment:
Enabled: false
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/EmptyLineAfterMagicComment:
Enabled: false
Layout/EmptyLineBetweenDefs:
Expand Down Expand Up @@ -93,6 +99,8 @@ Layout/IndentHeredoc:
Enabled: false
Layout/InitialIndentation:
Enabled: false
Layout/LeadingBlankLines:
Enabled: false
Layout/LeadingCommentSpace:
Enabled: false
Layout/MultilineArrayBraceLayout:
Expand Down Expand Up @@ -207,6 +215,8 @@ Lint/EndInMethod:
Enabled: false
Lint/EnsureReturn:
Enabled: false
Lint/ErbNewArguments:
Enabled: false
Lint/FloatOutOfRange:
Enabled: false
Lint/FormatParameterMismatch:
Expand Down Expand Up @@ -383,8 +393,12 @@ Performance/FixedSize:
Enabled: false
Performance/FlatMap:
Enabled: false
Performance/InefficientHashSearch:
Enabled: false
Performance/LstripRstrip:
Enabled: false
Performance/OpenStruct:
Enabled: false
Performance/RangeInclude:
Enabled: false
Performance/RedundantBlockCall:
Expand Down Expand Up @@ -417,6 +431,10 @@ Performance/UnneededSort:
Enabled: false
Performance/UriDefaultParser:
Enabled: false
Performance/ChainArrayAllocation:
Enabled: false
Style/AccessModifierDeclarations:
Enabled: false
Style/Alias:
Enabled: false
Style/AndOr:
Expand Down Expand Up @@ -491,8 +509,6 @@ Style/EmptyElse:
Enabled: false
Style/EmptyLambdaParameter:
Enabled: false
Style/EmptyLineAfterGuardClause:
Enabled: false
Style/EmptyLiteral:
Enabled: false
Style/EmptyMethod:
Expand Down Expand Up @@ -541,6 +557,8 @@ Style/InverseMethods:
Enabled: false
Style/InlineComment:
Enabled: false
Style/IpAddresses:
Enabled: false
Style/Lambda:
Enabled: false
Style/LambdaCall:
Expand All @@ -555,12 +573,14 @@ Style/MethodCalledOnDoEndBlock:
Enabled: false
Style/MethodDefParentheses:
Enabled: false
Style/MethodMissing:
Style/MethodMissingSuper:
Enabled: false
Style/MinMax:
Enabled: false
Style/MissingElse:
Enabled: false
Style/MissingRespondToMissing:
Enabled: false
Style/MixinGrouping:
Enabled: false
Style/MixinUsage:
Expand All @@ -573,6 +593,8 @@ Style/MultilineIfThen:
Enabled: false
Style/MultilineIfModifier:
Enabled: false
Style/MultilineMethodSignature:
Enabled: false
Style/MultilineMemoization:
Enabled: false
Style/MultilineTernaryOperator:
Expand Down Expand Up @@ -713,6 +735,8 @@ Style/UnlessElse:
Enabled: false
Style/UnneededCapitalW:
Enabled: false
Style/UnneededCondition:
Enabled: false
Style/UnneededInterpolation:
Enabled: false
Style/UnneededPercentQ:
Expand Down Expand Up @@ -743,18 +767,22 @@ Rails/ApplicationJob:
Enabled: false
Rails/ApplicationRecord:
Enabled: false
Rails/AssertNot:
Enabled: false
Rails/Blank:
Enabled: false
Rails/BulkChangeTable:
Enabled: false
Rails/CreateTableWithTimestamps:
Enabled: false
Rails/Date:
Enabled: false
Rails/DynamicFindBy:
Enabled: false
Rails/Delegate:
Enabled: false
Rails/DelegateAllowBlank:
Enabled: false
Rails/DynamicFindBy:
Enabled: false
Rails/EnumUniqueness:
Enabled: false
Rails/EnvironmentComparison:
Expand All @@ -779,12 +807,14 @@ Rails/InverseOf:
Enabled: false
Rails/LexicallyScopedActionFilter:
Enabled: false
Rails/NotNullColumn:
Rails/LinkToBlank:
Enabled: false
Rails/OutputSafety:
Rails/NotNullColumn:
Enabled: false
Rails/Output:
Enabled: false
Rails/OutputSafety:
Enabled: false
Rails/PluralizationGrammar:
Enabled: false
Rails/Presence:
Expand All @@ -795,12 +825,14 @@ Rails/ReadWriteAttribute:
Enabled: false
Rails/RedundantReceiverInWithOptions:
Enabled: false
Rails/RefuteMethods:
Enabled: false
Rails/RelativeDateConstant:
Enabled: false
Rails/RequestReferer:
Enabled: false
Rails/ReversibleMigration:
Enabled: false
Rails/RelativeDateConstant:
Enabled: false
Rails/SafeNavigation:
Enabled: false
Rails/SaveBang:
Expand Down
128 changes: 0 additions & 128 deletions config/disabled.yml

This file was deleted.

Loading

0 comments on commit ec1c760

Please sign in to comment.