From cfd3a5422343a819a3a5b67f2c26e2fe18d3e97e Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Fri, 2 Apr 2021 02:59:33 +0900 Subject: [PATCH] Update RuboCop to 1.12.1 This PR updates RuboCop to 1.12.1. https://github.com/rubocop-hq/rubocop/compare/v1.11.0...v1.12.1 It supports private API change from `RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP` to `RuboCop::DirectiveComment::COMMENT_DIRECTIVE_REGEXP`. - https://github.com/rubocop/rubocop/pull/9569/commits/7f1f75c106ccb6a958050dd1f1a3572311306070 - https://github.com/rubocop/rubocop/commit/04217101cf5284119fdf24a70d022b3a1bcb1b03 And `Style/StringChars` cop is added in RuboCop 1.12. It is up to maintainers to decide whether to enable it :-) https://github.com/rubocop/rubocop/pull/9615 --- Gemfile.lock | 4 ++-- lib/standard/rubocop/ext.rb | 6 +++--- standard.gemspec | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 08934d88..a96ba555 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: standard (1.0.4) - rubocop (= 1.11.0) + rubocop (= 1.12.1) rubocop-performance (= 1.10.1) GEM @@ -24,7 +24,7 @@ GEM rake (13.0.3) regexp_parser (2.1.1) rexml (3.2.4) - rubocop (1.11.0) + rubocop (1.12.1) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) diff --git a/lib/standard/rubocop/ext.rb b/lib/standard/rubocop/ext.rb index b5ea41cc..19ec245b 100644 --- a/lib/standard/rubocop/ext.rb +++ b/lib/standard/rubocop/ext.rb @@ -6,9 +6,9 @@ def message(_) end end - class CommentConfig - remove_const :COMMENT_DIRECTIVE_REGEXP - COMMENT_DIRECTIVE_REGEXP = Regexp.new( + class DirectiveComment + remove_const :DIRECTIVE_COMMENT_REGEXP + DIRECTIVE_COMMENT_REGEXP = Regexp.new( ('# (?:standard|rubocop) : ((?:disable|enable|todo))\b ' + COPS_PATTERN) .gsub(" ", '\s*') ) diff --git a/standard.gemspec b/standard.gemspec index 79ab9734..e5a44d57 100644 --- a/standard.gemspec +++ b/standard.gemspec @@ -19,6 +19,6 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency "rubocop", "1.11.0" + spec.add_dependency "rubocop", "1.12.1" spec.add_dependency "rubocop-performance", "1.10.1" end