module I18nLinter::Rules

Constants

NEGATIVE_RULES

Rules that filter the strings found

POSITIVE_RULES

Public Class Methods

check_negative_rules(config, tokens) click to toggle source
# File lib/i18n_linter/rules.rb, line 21
def check_negative_rules(config, tokens)
  config.enabled_negative_rules.any? { |rule| Rules.check_rule(rule, tokens) }
end
check_positive_rules(config, string) click to toggle source
# File lib/i18n_linter/rules.rb, line 17
def check_positive_rules(config, string)
  config.enabled_positive_rules.any? { |rule| Rules.check_rule(rule, string) }
end
check_rule(rule, string_or_tokens) click to toggle source
# File lib/i18n_linter/rules.rb, line 13
def check_rule(rule, string_or_tokens)
  Kernel.const_get("I18nLinter::Rules::#{rule}").new.check(string_or_tokens)
end
check_string_rules(config, string) click to toggle source
# File lib/i18n_linter/rules.rb, line 25
def check_string_rules(config, string)
  check_positive_rules(config, string)
end