Class: TRMNLP::Lint::Checks::CustomFieldsUsed
- Inherits:
-
TRMNLP::Lint::Check
- Object
- TRMNLP::Lint::Check
- TRMNLP::Lint::Checks::CustomFieldsUsed
- Defined in:
- lib/trmnlp/lint/checks/custom_fields_used.rb
Overview
Reports custom fields declared in .trmnlp.yml that never appear in the polling settings or the markup — one finding per unused field.
Constant Summary collapse
- SETTINGS_KEYS =
%w[polling_url polling_headers polling_body].freeze
Instance Method Summary collapse
Methods inherited from TRMNLP::Lint::Check
Constructor Details
This class inherits a constructor from TRMNLP::Lint::Check
Instance Method Details
#issues ⇒ Object
13 14 15 16 17 |
# File 'lib/trmnlp/lint/checks/custom_fields_used.rb', line 13 def issues source.custom_field_values.keys.reject { |keyname| used?(keyname) }.map do |keyname| { message: "Custom field '#{keyname}' is not used in form fields or markup." } end end |