class Diecut::ReportBuilders::UnusedDefault

Public Instance Methods

add(*args) click to toggle source
# File lib/diecut/report-builders/unused-default.rb, line 21
def add(*args)
  report.add(*args)
end
collect() click to toggle source
# File lib/diecut/report-builders/unused-default.rb, line 18
def collect
end
other_advice() click to toggle source
# File lib/diecut/report-builders/unused-default.rb, line 29
      def other_advice
        <<-EOA
        Plugins defined defaults for fields that don't appear in templates.

        It's possible that a plugin defined a default but it's template was
        overridden, so the fields disappeared. Diecut doesn't yet check for
        that case. In those cases, you can ignore this warning.

        The other possiblity is that the default path has a typo. This is
        especially likely if there's also a report about a missing output
        field.
        EOA
      end
other_summary() click to toggle source
# File lib/diecut/report-builders/unused-default.rb, line 25
def other_summary
  "Defaults are defined for fields that don't exist in output templates"
end
report_fields() click to toggle source
# File lib/diecut/report-builders/unused-default.rb, line 10
def report_fields
  ["Output field name", "Plugin name"]
end
report_name() click to toggle source
# File lib/diecut/report-builders/unused-default.rb, line 6
def report_name
  "Defaults are declared but unused"
end
report_status() click to toggle source
# File lib/diecut/report-builders/unused-default.rb, line 14
def report_status
  report.empty? ? "OK" : "WARN"
end