class SCSSLint::Linter::Comment
Checks for uses of renderable comments (/* … */)
Public Instance Methods
visit_comment(node)
click to toggle source
# File lib/scss_lint/linter/comment.rb, line 6 def visit_comment(node) add_lint(node, 'Use `//` comments everywhere') unless node.invisible? || allowed?(node) end
Private Instance Methods
allowed?(node)
click to toggle source
@param node [CommentNode] @return [Boolean]
# File lib/scss_lint/linter/comment.rb, line 14 def allowed?(node) return false unless config['allowed'] re = Regexp.new(config['allowed']) node.value.join.match(re) end