lib/scss_lint/config.rb in scss-lint-0.29.0 vs lib/scss_lint/config.rb in scss-lint-0.30.0
- old
+ new
@@ -173,11 +173,13 @@
def path_relative_to_config(relative_include_path, base_config_path)
if relative_include_path.start_with?('/')
relative_include_path
else
- File.join(File.dirname(base_config_path), relative_include_path)
+ path = File.join(File.dirname(base_config_path), relative_include_path)
+ # Remove double backslashes appearing in Windows paths.
+ path.gsub(%r{^//}, File::SEPARATOR)
end
end
# For easy stubbing in tests
def load_file_contents(file)
@@ -258,9 +260,18 @@
def exclude_file(file_path)
abs_path = File.expand_path(file_path)
@options['exclude'] ||= []
@options['exclude'] << abs_path
+ end
+
+ # @return Array
+ def scss_files
+ if path = @options['scss_files']
+ Dir[path]
+ else
+ []
+ end
end
private
def validate_linters