diff --git a/Steepfile b/Steepfile index 0b72b08..561ad7e 100644 --- a/Steepfile +++ b/Steepfile @@ -1,8 +1,15 @@ # frozen_string_literal: true +D = Steep::Diagnostic + target :lib do signature 'sig' check 'lib' repo_path '.gem_rbs_collection' + + configure_code_diagnostics do |hash| + hash[D::Ruby::MethodDefinitionMissing] = :warning + hash[D::Ruby::UnknownConstant] = :information + end end diff --git a/rbs_collection.lock.yaml b/rbs_collection.lock.yaml index d667b75..f34fb59 100644 --- a/rbs_collection.lock.yaml +++ b/rbs_collection.lock.yaml @@ -1,9 +1,4 @@ --- -sources: -- name: ruby/gem_rbs_collection - remote: https://github.com/ruby/gem_rbs_collection.git - revision: main - repo_dir: gems path: ".gem_rbs_collection" gems: - name: activesupport @@ -22,6 +17,14 @@ gems: revision: c42c09528dd99252db98f0744181a6de54ec2f55 remote: https://github.com/ruby/gem_rbs_collection.git repo_dir: gems +- name: base64 + version: '0' + source: + type: stdlib +- name: bigdecimal + version: '0' + source: + type: stdlib - name: concurrent-ruby version: '1.1' source: @@ -30,7 +33,15 @@ gems: revision: c42c09528dd99252db98f0744181a6de54ec2f55 remote: https://github.com/ruby/gem_rbs_collection.git repo_dir: gems -- name: csv +- name: connection_pool + version: '2.4' + source: + type: git + name: ruby/gem_rbs_collection + revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1 + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: date version: '0' source: type: stdlib @@ -46,6 +57,10 @@ gems: version: '0' source: type: stdlib +- name: forwardable + version: '0' + source: + type: stdlib - name: i18n version: '1.10' source: @@ -58,14 +73,6 @@ gems: version: '0' source: type: stdlib -- name: listen - version: '3.2' - source: - type: git - name: ruby/gem_rbs_collection - revision: c42c09528dd99252db98f0744181a6de54ec2f55 - remote: https://github.com/ruby/gem_rbs_collection.git - repo_dir: gems - name: logger version: '0' source: @@ -74,6 +81,22 @@ gems: version: '0' source: type: stdlib +- name: monitor + version: '0' + source: + type: stdlib +- name: mutex_m + version: '0' + source: + type: stdlib +- name: net-http + version: '0' + source: + type: stdlib +- name: net-protocol + version: '0' + source: + type: stdlib - name: parallel version: '1.20' source: @@ -82,6 +105,14 @@ gems: revision: c42c09528dd99252db98f0744181a6de54ec2f55 remote: https://github.com/ruby/gem_rbs_collection.git repo_dir: gems +- name: parser + version: '3.2' + source: + type: git + name: ruby/gem_rbs_collection + revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1 + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems - name: rainbow version: '3.0' source: @@ -90,30 +121,38 @@ gems: revision: c42c09528dd99252db98f0744181a6de54ec2f55 remote: https://github.com/ruby/gem_rbs_collection.git repo_dir: gems -- name: securerandom - version: '0' +- name: rake + version: '13.0' source: - type: stdlib -- name: steep - version: 1.3.0 - source: - type: rubygems -- name: strscan - version: '0' - source: - type: stdlib -- name: date - version: '0' + type: git + name: ruby/gem_rbs_collection + revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1 + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: regexp_parser + version: '2.8' source: - type: stdlib -- name: monitor - version: '0' + type: git + name: ruby/gem_rbs_collection + revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1 + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: rubocop + version: '1.57' source: - type: stdlib -- name: mutex_m - version: '0' + type: git + name: ruby/gem_rbs_collection + revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1 + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: rubocop-ast + version: '1.30' source: - type: stdlib + type: git + name: ruby/gem_rbs_collection + revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1 + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems - name: singleton version: '0' source: @@ -122,7 +161,7 @@ gems: version: '0' source: type: stdlib -- name: forwardable +- name: timeout version: '0' source: type: stdlib diff --git a/rbs_collection.yaml b/rbs_collection.yaml index a7b853f..d258b80 100644 --- a/rbs_collection.yaml +++ b/rbs_collection.yaml @@ -13,3 +13,5 @@ gems: # It's unnecessary if you don't use rbs as a library. - name: rbs ignore: true + - name: steep + ignore: true diff --git a/sig/ika3/concerns/utils.rbs b/sig/ika3/concerns/utils.rbs index 500876d..2b2a747 100644 --- a/sig/ika3/concerns/utils.rbs +++ b/sig/ika3/concerns/utils.rbs @@ -1,7 +1,7 @@ module Ika3 module Concerns module Utils - def self?.load_yaml_file: (file: String) -> Object + def self?.load_yaml_file: (String) -> Object end end end diff --git a/sig/ika3/schedule.rbs b/sig/ika3/schedule.rbs index 33d708c..aabe45a 100644 --- a/sig/ika3/schedule.rbs +++ b/sig/ika3/schedule.rbs @@ -1,14 +1,14 @@ class Hash[unchecked out K, unchecked out V] < Object - def method_missing: (name: String) -> untyped + def method_missing: (Symbol) -> untyped end module Ika3 class Schedule - def initialize: (contact: String) -> void + def initialize: (String) -> void private - def send_request: (method: String, path: String) -> Object + def send_request: (Symbol, String) -> Object def api_url: () -> "https://spla3.yuu26.com/" diff --git a/sig/ika3/weapon.rbs b/sig/ika3/weapon.rbs index 8f7dcf2..a7f525b 100644 --- a/sig/ika3/weapon.rbs +++ b/sig/ika3/weapon.rbs @@ -4,21 +4,21 @@ module Ika3 include Ika3::Concerns::Utils - def self.find: (untyped weapon_key) -> untyped + def self.find: (String) -> (Exception | Object) - def self.find_by_name: (untyped weapon_name) -> untyped + def self.find_by_name: (String) -> (Exception | Object) - def self.filter_by_sub: (untyped sub_name) -> untyped + def self.filter_by_sub: (String) -> (Exception | Object) - def self.reload_config!: () -> untyped + def self.reload_config!: () -> void private def self.names: () -> Array[Symbol] - def self.weapons: () -> Array[Object] + def self.weapons: () -> Hash[Symbol, String] - def self.sub_weapons: () -> Array[Object] + def self.sub_weapons: () -> Hash[Symbol, String] def self.config: () -> untyped