Class: RuboCop::Cop::Kata::NoComments
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Kata::NoComments
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/kata/no_comments.rb
Constant Summary collapse
- MSG =
"Say it in the code: rename it, extract it, or name the constant."- MAGIC =
/\A#\s*(frozen_string_literal|encoding|coding|warn_indent|shareable_constant_value):/- DIRECTIVE =
/\A#\s*(rubocop|simplecov|rbs|steep|sorbet|typed|:nocov:)/- NOTICE =
/^#\s*(copyright\b|\(c\)\s*\d|spdx-|licen[sc]ed under\b|licen[sc]e:|all rights reserved)/i- SHEBANG =
/\A#!/
Instance Method Summary collapse
Instance Method Details
#on_new_investigation ⇒ Object
13 14 15 16 |
# File 'lib/rubocop/cop/kata/no_comments.rb', line 13 def on_new_investigation header = notice processed_source.comments.each { register(it) unless exempt?(it) || header.include?(it) } end |