scss-lint 0.5 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,6 +17,9 @@ module SCSSLint
17
17
 
18
18
  @lines = @contents.split("\n")
19
19
  @tree = @engine.to_tree
20
+ #@tree, _ = Sass::Tree::Visitors::Perform.visit(@tree)
21
+
22
+ Sass::CSS.dump_selectors(@tree)
20
23
  end
21
24
  end
22
25
  end
@@ -1,3 +1,3 @@
1
1
  module SCSSLint
2
- VERSION = '0.5'
2
+ VERSION = '0.5.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scss-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-24 00:00:00.000000000 Z
12
+ date: 2013-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize
@@ -68,25 +68,24 @@ executables:
68
68
  extensions: []
69
69
  extra_rdoc_files: []
70
70
  files:
71
- - lib/scss_lint/version.rb
72
- - lib/scss_lint/runner.rb
71
+ - lib/scss_lint.rb
72
+ - lib/scss_lint/cli.rb
73
+ - lib/scss_lint/engine.rb
73
74
  - lib/scss_lint/lint.rb
74
75
  - lib/scss_lint/linter.rb
76
+ - lib/scss_lint/linter/debug_linter.rb
75
77
  - lib/scss_lint/linter/declaration_order_linter.rb
76
- - lib/scss_lint/linter/duplicate_selector_linter.rb
77
78
  - lib/scss_lint/linter/empty_rule_linter.rb
78
- - lib/scss_lint/linter/debug_linter.rb
79
+ - lib/scss_lint/linter/hex_linter.rb
80
+ - lib/scss_lint/linter/property_format_linter.rb
81
+ - lib/scss_lint/linter/shorthand_linter.rb
79
82
  - lib/scss_lint/linter/single_line_per_selector_linter.rb
80
83
  - lib/scss_lint/linter/sorted_properties_linter.rb
81
- - lib/scss_lint/linter/shorthand_linter.rb
82
84
  - lib/scss_lint/linter/type_in_id_selector_linter.rb
83
- - lib/scss_lint/linter/property_format_linter.rb
84
85
  - lib/scss_lint/linter/zero_unit_linter.rb
85
- - lib/scss_lint/linter/hex_linter.rb
86
- - lib/scss_lint/cli.rb
87
- - lib/scss_lint/engine.rb
88
86
  - lib/scss_lint/linter_registry.rb
89
- - lib/scss_lint.rb
87
+ - lib/scss_lint/runner.rb
88
+ - lib/scss_lint/version.rb
90
89
  - bin/scss-lint
91
90
  homepage: http://github.com/causes/scss-lint
92
91
  licenses: []
@@ -1,45 +0,0 @@
1
- require 'sass'
2
- require 'set'
3
-
4
- module SCSSLint
5
- class Linter::DuplicateSelectorLinter < Linter
6
- include LinterRegistry
7
-
8
- class << self
9
- def run(engine)
10
- lints = []
11
- engine.tree.each do |node|
12
- if node.is_a?(Sass::Tree::RuleNode)
13
- lints << check_selector_already_used(node)
14
- end
15
- end
16
- lints.compact
17
- end
18
-
19
- def description
20
- 'Rule was declared with same selector as another--you should merge them'
21
- end
22
-
23
- private
24
-
25
- def check_selector_already_used(rule_node)
26
- #selectors_seen = Set.new
27
-
28
- puts rule_node.rule.inspect
29
- puts rule_node.resolved_rules
30
-
31
- #rule_node.children.each do |child|
32
- #selectors = child.rule.first.to_s.gsub(/\s/, '')
33
-
34
- #if selectors_seen.member?(selectors)
35
- #return create_lint(child)
36
- #else
37
- #selectors_seen.add selectors
38
- #end
39
- #end
40
-
41
- nil
42
- end
43
- end
44
- end
45
- end