Class: PlatformosCheck::UnreachableCode
- Inherits:
-
LiquidCheck
- Object
- Check
- LiquidCheck
- PlatformosCheck::UnreachableCode
- Defined in:
- lib/platformos_check/checks/unreachable_code.rb
Constant Summary collapse
- FLOW_COMMAND =
%i[break continue return]
- CONDITION_TYPES =
Set.new(%i[condition else_condition])
- INCLUDE_FLOW_COMMAND =
%w[break].freeze
Constants inherited from Check
Check::CATEGORIES, Check::SEVERITIES, Check::SEVERITY_VALUES
Instance Attribute Summary
Attributes inherited from Check
#ignored_patterns, #offenses, #options, #platformos_app
Instance Method Summary collapse
Methods included from ChecksTracking
Methods included from ParsingHelpers
Methods inherited from Check
#==, #add_offense, all, can_disable, #can_disable?, categories, #categories, category, #code_name, doc, #doc, docs_url, #ignore!, #ignored?, #severity, severity, #severity=, #severity_value, severity_value, single_file, #single_file?, #to_s, #whole_platformos_app?
Methods included from JsonHelpers
#format_json_parse_error, #pretty_json
Instance Method Details
#on_document(node) ⇒ Object
13 14 15 16 |
# File 'lib/platformos_check/checks/unreachable_code.rb', line 13 def on_document(node) @processed_files = {} check_unreachable_code(node.children) end |