Sha256: bb022501f6e821e5a04d6bc57f201d1c08124ccd727c10aa9a42959244cde6fd
Contents?: true
Size: 1.12 KB
Versions: 3
Compression:
Stored size: 1.12 KB
Contents
# typed: strict # frozen_string_literal: true require 'rubocop/packs/private/configuration' module RuboCop module Packs module Private extend T::Sig sig { void } def self.bust_cache! @rubocop_todo_ymls = nil @loaded_client_configuration = nil end sig { void } def self.load_client_configuration @loaded_client_configuration ||= T.let(false, T.nilable(T::Boolean)) return if @loaded_client_configuration @loaded_client_configuration = true client_configuration = Pathname.pwd.join('config/rubocop_packs.rb') require client_configuration.to_s if client_configuration.exist? end sig { returns(T::Array[T::Hash[T.untyped, T.untyped]]) } def self.rubocop_todo_ymls @rubocop_todo_ymls = T.let(@rubocop_todo_ymls, T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) @rubocop_todo_ymls ||= begin todo_files = Pathname.glob('**/.rubocop_todo.yml') todo_files.map do |todo_file| YAML.load_file(todo_file) end end end end private_constant :Private end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubocop-packs-0.0.13 | lib/rubocop/packs/private.rb |
rubocop-packs-0.0.12 | lib/rubocop/packs/private.rb |
rubocop-packs-0.0.11 | lib/rubocop/packs/private.rb |