Class: SCSSLint::Linter
- Inherits:
-
Sass::Tree::Visitors::Base
- Object
- Sass::Tree::Visitors::Base
- SCSSLint::Linter
- Includes:
- SelectorVisitor, Utils
- Defined in:
- lib/scss_lint/linter.rb
Overview
Defines common functionality available to all linters.
Direct Known Subclasses
BorderZero, CapitalizationInSelector, ColorKeyword, Comment, Compass, DebugStatement, DeclarationOrder, DuplicateProperty, ElsePlacement, EmptyLineBetweenBlocks, EmptyRule, FinalNewline, HexLength, HexNotation, HexValidation, IdWithExtraneousSelector, Indentation, LeadingZero, MergeableSelector, NameFormat, PlaceholderInExtend, PropertySortOrder, PropertySpelling, SelectorDepth, Shorthand, SingleLinePerSelector, SpaceAfterComma, SpaceAfterPropertyColon, SpaceAfterPropertyName, SpaceBeforeBrace, SpaceBetweenParens, StringQuotes, TrailingSemicolonAfterPropertyValue, UnnecessaryMantissa, UrlFormat, UrlQuotes, ZeroUnit
Defined Under Namespace
Classes: BorderZero, CapitalizationInSelector, ColorKeyword, Comment, Compass, DebugStatement, DeclarationOrder, DuplicateProperty, ElsePlacement, EmptyLineBetweenBlocks, EmptyRule, FinalNewline, HexLength, HexNotation, HexValidation, IdWithExtraneousSelector, Indentation, LeadingZero, MergeableSelector, NameFormat, PlaceholderInExtend, PropertySortOrder, PropertySpelling, SelectorDepth, Shorthand, SingleLinePerSelector, SpaceAfterComma, SpaceAfterPropertyColon, SpaceAfterPropertyName, SpaceBeforeBrace, SpaceBetweenParens, StringQuotes, TrailingSemicolonAfterPropertyValue, UnnecessaryMantissa, UrlFormat, UrlQuotes, ZeroUnit
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#engine ⇒ Object
readonly
Returns the value of attribute engine.
-
#lints ⇒ Object
readonly
Returns the value of attribute lints.
Instance Method Summary collapse
-
#initialize ⇒ Linter
constructor
A new instance of Linter.
- #run(engine, config) ⇒ Object
Methods included from Utils
#extract_string_selectors, #node_siblings, #pluralize, #previous_node, #remove_quoted_strings, #same_position?
Methods included from SelectorVisitor
Constructor Details
#initialize ⇒ Linter
Returns a new instance of Linter.
9 10 11 |
# File 'lib/scss_lint/linter.rb', line 9 def initialize @lints = [] end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/scss_lint/linter.rb', line 7 def config @config end |
#engine ⇒ Object (readonly)
Returns the value of attribute engine.
7 8 9 |
# File 'lib/scss_lint/linter.rb', line 7 def engine @engine end |
#lints ⇒ Object (readonly)
Returns the value of attribute lints.
7 8 9 |
# File 'lib/scss_lint/linter.rb', line 7 def lints @lints end |
Instance Method Details
#run(engine, config) ⇒ Object
15 16 17 18 19 |
# File 'lib/scss_lint/linter.rb', line 15 def run(engine, config) @config = config @engine = engine visit(engine.tree) end |