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.
- data/lib/scss_lint.rb +1 -0
- data/lib/scss_lint/cli.rb +2 -1
- data/lib/scss_lint/reporter/default_reporter.rb +5 -3
- data/lib/scss_lint/runner.rb +1 -1
- data/lib/scss_lint/version.rb +1 -1
- metadata +2 -2
data/lib/scss_lint.rb
CHANGED
@@ -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|
|
data/lib/scss_lint/cli.rb
CHANGED
@@ -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
|
-
|
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.
|
7
|
-
|
8
|
-
|
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
|
data/lib/scss_lint/runner.rb
CHANGED
data/lib/scss_lint/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2013-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|