lib/phare/checks/scss_lint.rb in phare-0.2 vs lib/phare/checks/scss_lint.rb in phare-0.2.1
- old
+ new
@@ -2,12 +2,13 @@
module Checks
class ScssLint
attr_reader :status
def initialize(directory)
- @path = File.expand_path("#{directory}app/assets/**/*.css.scss", __FILE__)
- @command = "scss-lint #{@path}"
+ @path = File.expand_path("#{directory}app/assets/stylesheets", __FILE__)
+ @glob = File.join(@path, '**/*.css.scss')
+ @command = "scss-lint #{@glob}"
end
def run
if should_run?
print_banner
@@ -27,10 +28,10 @@
end
protected
def should_run?
- !`which scss-lint`.empty?
+ !`which scss-lint`.empty? && Dir.exists?(@path)
end
def print_banner
puts '------------------------------------------'
puts 'Running SCSS-Lint to check for SCSS style…'