class Buildr::ScssLint::Config
Attributes
config_directory[W]
configuration_file[W]
file_excludes[W]
format[W]
html_output_file[W]
linter_excludes[W]
linter_includes[W]
project[R]
report_dir[W]
style_file[W]
xml_output_file[W]
Public Class Methods
new(project)
click to toggle source
# File addon/buildr/scss_lint.rb, line 144 def initialize(project) @project = project end
Public Instance Methods
config_directory()
click to toggle source
# File addon/buildr/scss_lint.rb, line 72 def config_directory @config_directory || project._(:source, :main, :etc, :scss_lint) end
configuration_file()
click to toggle source
# File addon/buildr/scss_lint.rb, line 102 def configuration_file @configuration_file || "#{self.config_directory}/checks.yml" end
enabled?()
click to toggle source
# File addon/buildr/scss_lint.rb, line 62 def enabled? File.exist?(self.configuration_file) end
file_excludes()
click to toggle source
# File addon/buildr/scss_lint.rb, line 84 def file_excludes @file_excludes ||= [] end
format()
click to toggle source
# File addon/buildr/scss_lint.rb, line 108 def format @format || 'XML' end
html_enabled?()
click to toggle source
# File addon/buildr/scss_lint.rb, line 66 def html_enabled? File.exist?(self.style_file) end
html_output_file()
click to toggle source
# File addon/buildr/scss_lint.rb, line 120 def html_output_file @html_output_file || "#{self.report_dir}/scss_lint.html" end
linter_excludes()
click to toggle source
# File addon/buildr/scss_lint.rb, line 96 def linter_excludes @linter_excludes ||= [] end
linter_includes()
click to toggle source
# File addon/buildr/scss_lint.rb, line 90 def linter_includes @linter_includes ||= [] end
report_dir()
click to toggle source
# File addon/buildr/scss_lint.rb, line 78 def report_dir @report_dir || project._(:reports, :scss_lint) end
source_paths()
click to toggle source
# File addon/buildr/scss_lint.rb, line 138 def source_paths @source_paths ||= [self.project._(:source, :main, :webapp, :sass)] end
style_file()
click to toggle source
# File addon/buildr/scss_lint.rb, line 126 def style_file unless @style_file project_xsl = "#{self.config_directory}/scss_lint-report.xsl" if File.exist?(project_xsl) @style_file = project_xsl else @style_file = "#{File.dirname(__FILE__)}/scss_lint-report.xsl" end end @style_file end
xml_output_file()
click to toggle source
# File addon/buildr/scss_lint.rb, line 114 def xml_output_file @xml_output_file || "#{self.report_dir}/scss_lint.xml" end