Module: Pluginscan::CommentChecker
- Defined in:
- lib/pluginscan/reports/issues_report/issue_checks/comment_checker.rb
Overview
Responsible for deciding whether usages of a variable in a string are in a comment
Constant Summary collapse
- COMMENT_REGEXPS =
[ %r{^\s*//}, # line comment /^\s*\*/, # block comment ].freeze
Class Method Summary collapse
Class Method Details
.commented?(content) ⇒ Boolean
9 10 11 |
# File 'lib/pluginscan/reports/issues_report/issue_checks/comment_checker.rb', line 9 def self.commented?(content) COMMENT_REGEXPS.any? { |regexp| content.match(regexp) } end |