-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rbs types and corresponding lint check (#57)
First: - Add `rbs` gem and all `rbs` types in `sig/` directory - Add `steep` gem for easier rbs type checking, with basic configuration only checking `lib` for now - Add `rubyzip` types as they are not defined Then: - Add `|| raise` for places where we expect to always have a value, but that rbs/steep are not smart enough to autodetect - Add `EMPTY_ENUMERATOR` to be returned when there is no iteration to perform - Add `_Nilable` interface to allow for `nil?` check on generic type for `ProviderCollection#contains?` - Expand `ProviderCollection#resolve` to `key?` check to prevent rbs/steep from complaining about `Cannot have body method` - Add `children_match_prefix` `partial_word_chars?` `word_chars?` `closest_node` private abstract methods to `Nodes::Node`, so that both `Nodes::Raw` and `Nodes::Compressed` have it without duplication - Make `yardoc` match `rbs` types Finally: - Rename `char_symbols` to `reversed_char_symbols` for clarity - Rename `Nodes::Raw#add`'s param `chars` to `reversed_chars` for clarity - Add `lint-rbs-steep` action - Rename `lint` => `lint-rubocop` - Bump lint and coverage ruby versions to `3.3.6`
- Loading branch information
Showing
40 changed files
with
691 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
# D = Steep::Diagnostic | ||
# | ||
target :lib do | ||
signature 'sig' | ||
|
||
check 'lib' | ||
# check 'tasks' | ||
|
||
# check 'Gemfile' | ||
# check 'Guardfile' | ||
# check 'Rakefile' | ||
# check 'Steepfile' | ||
|
||
# library 'rubyzip' | ||
library 'yaml' | ||
library 'securerandom' | ||
|
||
# configure_code_diagnostics(D::Ruby.default) # `default` diagnostics setting (applies by default) | ||
# configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting | ||
# configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting | ||
# configure_code_diagnostics(D::Ruby.silent) # `silent` diagnostics setting | ||
# configure_code_diagnostics do |hash| # You can setup everything yourself | ||
# hash[D::Ruby::NoMethod] = :information | ||
# end | ||
end | ||
|
||
# target :test do | ||
# signature 'sig', 'sig-private' | ||
# | ||
# check 'test' | ||
# | ||
# # library 'pathname' # Standard libraries | ||
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.