class SuspiciousCommentRule

Public Class Methods

AnalyzeTokens(tokens) click to toggle source
# File lib/rules/suspicious_comment_rule.rb, line 14
def self.AnalyzeTokens(tokens)
  result = []

  ftokens = self.get_comments(tokens)
  ftokens.each do |token|
    token_value = token.value.downcase
    token_type = token.type.to_s
    if (token_value =~ @suspicious_conf.value)
      result.append(Sin.new(SinType::SuspiciousComments, token.line, token.column, token.line, token.column+token_value.length))
    end
  end

  return result
end