Sha256: af0fa88794f70140ad9da1827558cf9b4625d707065e13973933e7027fe9d4f5

Contents?: true

Size: 439 Bytes

Versions: 17

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true
module RuboCop
  # we're monkey patching the config regex to allow for # cookstyle: disable whatever
  # in addition to the # rubocop: disable whatever that comes with RuboCop
  class DirectiveComment
    remove_const(:DIRECTIVE_COMMENT_REGEXP)
    DIRECTIVE_COMMENT_REGEXP = Regexp.new(
      "# (?:rubocop|cookstyle) : ((?:disable|enable|todo))\\b #{COPS_PATTERN}"
        .gsub(' ', '\s*')
    )
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
cookstyle-7.32.8 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.32.7 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-ng-8.0.0 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.32.2 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.32.1 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.32.0 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.31.9 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.31.7 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.31.3 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.31.1 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.31.0 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.30.4 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.30.3 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.30.1 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.28.2 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.27.0 lib/rubocop/monkey_patches/directive_comment.rb
cookstyle-7.26.1 lib/rubocop/monkey_patches/directive_comment.rb