/
githubmirror
/
fastlane
Обзор
Документация
Войти
/
githubmirror
/
fastlane
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
internal/rubocop/is_string_usage.rb
25 строк
747 B
Connor Tumbleson
[chore] remove top level dirs of "rakelib" and "rubocop" (#30045)
21 май 2026, 14:12
Не верифицирован
21 май 2026, 14:12
53fa216
Код
Авторство
О чём код?
require 'rubocop' module RuboCop module Cop module Lint class IsStringUsage < RuboCop::Cop::Cop MSG = 'is_string key in used in FastlaneCore::ConfigItem. Replace with `type: <Integer|Float|String|Boolean|Array|Hash>`'.freeze def on_hash(node) pairs = node.pairs return if pairs.empty? pairs.each do |pair| key = pair.key value = pair.value next unless key.source.to_sym == :is_string && (value.source.to_s == "false" || value.source.to_s == "true") if node.parent.children[0].source == "FastlaneCore::ConfigItem" add_offense(pair, location: :expression) end end end end end end end