Class: RuboCop::Cop::Glib::Localize
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Glib::Localize
- Defined in:
- lib/glib/rubocop/cops/localize.rb
Constant Summary collapse
- RESTRICT_ON_SEND =
%i[h1 h2 h3 h4 h5 p label markdown fields_text fields_number fields_select fields_password fields_textarea fields_check fields_checkGroup fields_chipGroup fields_timeZone fields_radioGroup fields_date fields_datetime].freeze
Instance Method Summary collapse
- #on_send(node) ⇒ Object (also: #on_csend)
Instance Method Details
#on_send(node) ⇒ Object Also known as: on_csend
16 17 18 19 20 |
# File 'lib/glib/rubocop/cops/localize.rb', line 16 def on_send(node) watched_key?(node) do |snode| add_offense(snode.first, message: 'Unlocalized string') if snode.first.str_type? || snode.first.dstr_type? end end |