scss-lint 0.6.5 → 0.6.6

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.
@@ -8,6 +8,7 @@ module SCSSLint
8
8
  autoload :Linter, 'scss_lint/linter'
9
9
  autoload :Reporter, 'scss_lint/reporter'
10
10
  autoload :Runner, 'scss_lint/runner'
11
+ autoload :VERSION, 'scss_lint/version'
11
12
 
12
13
  # Load all linters
13
14
  Dir[File.expand_path('scss_lint/linter/*.rb', File.dirname(__FILE__))].each do |file|
@@ -73,7 +73,8 @@ module SCSSLint
73
73
  def report_lints(lints)
74
74
  sorted_lints = lints.sort_by { |l| [l.filename, l.line] }
75
75
  reporter = options.fetch(:reporter, Reporter::DefaultReporter).new(sorted_lints)
76
- puts reporter.report_lints
76
+ output = reporter.report_lints
77
+ print output if output
77
78
  end
78
79
 
79
80
  def print_help(help_message, err = nil)
@@ -3,9 +3,11 @@ require 'colorize'
3
3
  module SCSSLint
4
4
  class Reporter::DefaultReporter < Reporter
5
5
  def report_lints
6
- lints.map do |lint|
7
- "#{lint.filename}:".yellow + "#{lint.line} - #{lint.description}"
8
- end.join("\n")
6
+ if lints.any?
7
+ lints.map do |lint|
8
+ "#{lint.filename}:".yellow + "#{lint.line} - #{lint.description}"
9
+ end.join("\n") + "\n"
10
+ end
9
11
  end
10
12
  end
11
13
  end
@@ -45,7 +45,7 @@ module SCSSLint
45
45
  end
46
46
 
47
47
  def lints?
48
- @lints.any?
48
+ lints.any?
49
49
  end
50
50
  end
51
51
  end
@@ -1,3 +1,3 @@
1
1
  module SCSSLint
2
- VERSION = '0.6.5'
2
+ VERSION = '0.6.6'
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.6.5
4
+ version: 0.6.6
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-03-20 00:00:00.000000000 Z
12
+ date: 2013-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize