Class: SCSSLint::Linter::SpaceAfterComma

Inherits:
SCSSLint::Linter
  • Object
show all
Includes:
SCSSLint::LinterRegistry
Defined in:
lib/scss_lint/linter/space_after_comma.rb

Overview

Checks for spaces after commas in argument lists.

Instance Attribute Summary

Attributes inherited from SCSSLint::Linter

#config, #engine, #lints

Instance Method Summary collapse

Methods included from SCSSLint::LinterRegistry

extract_linters_from, included

Methods inherited from SCSSLint::Linter

#add_lint, #character_at, #initialize, #node_on_single_line, #run, #source_from_range, #visit, #visit_children

Methods included from Utils

#can_be_condensed?, #extract_string_selectors, #pluralize, #previous_node, #remove_quoted_strings, #shortest_hex_form

Methods included from SelectorVisitor

#visit_selector

Constructor Details

This class inherits a constructor from SCSSLint::Linter

Instance Method Details

#visit_function(node) ⇒ Object



16
17
18
19
# File 'lib/scss_lint/linter/space_after_comma.rb', line 16

def visit_function(node)
  check_definition(node, :function)
  yield
end

#visit_mixin(node) ⇒ Object



11
12
13
14
# File 'lib/scss_lint/linter/space_after_comma.rb', line 11

def visit_mixin(node)
  check_invocation(node, :mixin)
  yield
end

#visit_mixindef(node) ⇒ Object



6
7
8
9
# File 'lib/scss_lint/linter/space_after_comma.rb', line 6

def visit_mixindef(node)
  check_definition(node, :mixin)
  yield
end

#visit_script_funcall(node) ⇒ Object



21
22
23
24
# File 'lib/scss_lint/linter/space_after_comma.rb', line 21

def visit_script_funcall(node)
  check_invocation(node, :function)
  yield
end

#visit_script_listliteral(node) ⇒ Object



26
27
28
29
# File 'lib/scss_lint/linter/space_after_comma.rb', line 26

def visit_script_listliteral(node)
  check_commas_after_args(node.elements, 'lists') if node.separator == :comma
  yield
end