Class: ThemeCheck::ValidHTMLTranslation

Inherits:
JsonCheck show all
Defined in:
lib/theme_check/checks/valid_html_translation.rb

Constant Summary

Constants inherited from Check

Check::CATEGORIES, Check::SEVERITIES

Instance Attribute Summary

Attributes inherited from Check

#offenses, #options, #theme

Instance Method Summary collapse

Methods inherited from JsonCheck

#add_offense

Methods included from ChecksTracking

#inherited

Methods inherited from Check

all, can_disable, #can_disable?, categories, #categories, category, #code_name, #doc, doc, docs_url, #ignore!, #ignored?, #severity, severity, #to_s, #unignore!

Methods included from JsonHelpers

#format_json_parse_error

Instance Method Details

#on_file(file) ⇒ Object



10
11
12
13
14
15
# File 'lib/theme_check/checks/valid_html_translation.rb', line 10

def on_file(file)
  return unless file.name.start_with?("locales/")
  return unless file.content.is_a?(Hash)

  visit_nested(file.content)
end