-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to annotate "self" on toplevel
To support ERB, this allows to annotate "self" on the top level context. It effects to the whole of the file. It will also help to support other DSLs (ex. Gemfile, Rakefile, and so on). Example: ``` # @type self: Gemfile group :develop do gem 'steep' gem 'rbs' end ``` ``` # @type self: Raketask namespace :my_group do desc "My Task" task :my_task do ... end end ``` refs: #1409
- Loading branch information
Showing
5 changed files
with
58 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
target :test do | ||
check "*.rb" | ||
|
||
implicitly_returns_nil! true | ||
|
||
configure_code_diagnostics(Steep::Diagnostic::Ruby.all_error) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# @type self: String | ||
|
||
succ | ||
to_s | ||
each_line do |line| | ||
puts line | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--- [] |
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