Class: Diecut::ReportBuilders::MissingContextField
Instance Attribute Summary
#mill
Instance Method Summary
collapse
all_kinds, #build_report, #each_default, #each_option, #each_plugin, #each_template, #fail_advice, #fail_summary, #go, #initialize, #pass_advice, #pass_summary, register, #report, #review, #strict_sequence?, #unindent
Instance Method Details
#add(*args) ⇒ Object
21
22
23
|
# File 'lib/diecut/report-builders/missing-context-field.rb', line 21
def add(*args)
report.add(*args)
end
|
#collect ⇒ Object
18
19
|
# File 'lib/diecut/report-builders/missing-context-field.rb', line 18
def collect
end
|
#other_advice ⇒ Object
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/diecut/report-builders/missing-context-field.rb', line 29
def other_advice
<<-EOA
Plugins defined options that go to fields that don't appear in templates.
It's possible that a plugin defined an option for its templates but they were
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. The option might be used in a resolve somewhere, so even if it
doesn't directly set an output field, it might influence generation
that way.
Do be careful to check this option: the option
EOA
end
|
#other_summary ⇒ Object
25
26
27
|
# File 'lib/diecut/report-builders/missing-context-field.rb', line 25
def other_summary
"Options provide values that aren't used by any template"
end
|
#report_fields ⇒ Object
10
11
12
|
# File 'lib/diecut/report-builders/missing-context-field.rb', line 10
def report_fields
["Output field name", "Option_name", "Plugin name"]
end
|
#report_name ⇒ Object
6
7
8
|
# File 'lib/diecut/report-builders/missing-context-field.rb', line 6
def report_name
"Unused options"
end
|
#report_status ⇒ Object
14
15
16
|
# File 'lib/diecut/report-builders/missing-context-field.rb', line 14
def report_status
report.empty? ? "OK" : "WARN"
end
|