lib/standard/rubocop/ext.rb in standard-1.21.0 vs lib/standard/rubocop/ext.rb in standard-1.21.1

- old
+ new

@@ -11,6 +11,15 @@ DIRECTIVE_COMMENT_REGEXP = Regexp.new( ('# (?:standard|rubocop) : ((?:disable|enable|todo))\b ' + COPS_PATTERN) .gsub(" ", '\s*') ) end + + class CommentConfig + alias_method :old_initialize, :initialize + + def initialize(processed_source) + old_initialize(processed_source) + @no_directives &&= !processed_source.raw_source.include?("standard") + end + end end