scss-lint 0.24.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17fa291ee89e19fe0f6103299f2615c7e3a83633
4
- data.tar.gz: e52fcd5476a7f944884cb7d8714649dc51ea4e89
3
+ metadata.gz: 6a3663e2870c45af5654c5fea5a7289ac4fb9632
4
+ data.tar.gz: 1167dbea3c255892fda1ccd621cb47b4b50f632f
5
5
  SHA512:
6
- metadata.gz: 19b28041ce7fa7c14ff869de3be4193543a9c1e43285c2f150e23dc22cdaac3aeaebf4764803a61880646fb4baf5e5d9a5d78e6a970956b0eeae7763f14c0d8e
7
- data.tar.gz: b87d1c50bbd9805083d687de07e8eaafbd90e931c85171a58fa6ca09cc344d57da30b6fd85ab55d928b633ff4cf7c4c680a2b5671c310c79f7f9cec03e6181c6
6
+ metadata.gz: 507b9deb0e2cbcde999f141ae35d9ebba74e80e045054334a0d448a94afadc3934b5963d88276cfee4be1f8ee98d3b1b4c0136f2ad1030b75554f9170a052c79
7
+ data.tar.gz: 67c939b682e3b4f05d260ebc771a8a0c68455c4766025badf8d69ccecb91ffddabe01ef1b68af2bb69434707ea21c41bf6465645a8475d43125bbf13ffe43657
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'scss_lint'
4
+ require 'scss_lint/cli'
4
5
 
5
6
  SCSSLint::CLI.new(ARGV).tap do |cli|
6
7
  cli.parse_arguments
@@ -1,6 +1,5 @@
1
1
  require 'scss_lint/constants'
2
2
  require 'scss_lint/config'
3
- require 'scss_lint/cli'
4
3
  require 'scss_lint/engine'
5
4
  require 'scss_lint/location'
6
5
  require 'scss_lint/lint'
@@ -24,6 +23,6 @@ end
24
23
 
25
24
  # Load all reporters
26
25
  require 'scss_lint/reporter'
27
- Dir[File.expand_path('scss_lint/reporter/*.rb', File.dirname(__FILE__))].sort.each do |file|
26
+ Dir[File.expand_path('scss_lint/reporter/**/*.rb', File.dirname(__FILE__))].sort.each do |file|
28
27
  require file
29
28
  end
@@ -186,7 +186,7 @@ module SCSSLint
186
186
  # @param lints [Array<Lint>]
187
187
  def report_lints(lints)
188
188
  sorted_lints = lints.sort_by { |l| [l.filename, l.location] }
189
- reporter = @options.fetch(:reporter, Reporter::DefaultReporter)
189
+ reporter = @options.fetch(:reporter, SCSSLint::Reporter::DefaultReporter)
190
190
  .new(sorted_lints)
191
191
  output = reporter.report_lints
192
192
  print output if output
@@ -48,6 +48,7 @@ module SCSSLint
48
48
  end
49
49
 
50
50
  def single_rule?(node)
51
+ return unless node.parsed_rules
51
52
  node.parsed_rules.members.count == 1
52
53
  end
53
54
 
@@ -9,12 +9,10 @@ module SCSSLint
9
9
 
10
10
  unless has_nested_props
11
11
  if has_space_before_semicolon?(node)
12
- line = node.source_range.end_pos
12
+ line = node.source_range.start_pos.line
13
13
  add_lint line, 'Property declaration should be terminated by a semicolon'
14
14
  elsif !ends_with_semicolon?(node)
15
- # Adjust line since lack of semicolon results in end of source range
16
- # being on the next line
17
- line = node.source_range.end_pos.line - 1
15
+ line = node.source_range.start_pos.line
18
16
  add_lint line,
19
17
  'Property declaration should not have a space before ' \
20
18
  'the terminating semicolon'
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  module SCSSLint
3
- VERSION = '0.24.0'
3
+ VERSION = '0.24.1'
4
4
  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.24.0
4
+ version: 0.24.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Causes Engineering
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-14 00:00:00.000000000 Z
12
+ date: 2014-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow