-
Notifications
You must be signed in to change notification settings - Fork 93
Release Note 1.7
Some of the highlights in Steep 1.7 are:
- Ignore diagnostics by
steep:ignore
comment (#1034) - Untyped argument type (#1101)
- Rake tasks (#995, #1156)
- Delete unnecessary files from gem package (#962, #1144)
You can install it with $ gem install steep
or using Bundler.
gem 'steep', require: false, '~> 1.7.0'
See the CHANGELOG for the details.
#1034 implements steep:ignore
comments that hides diagnostics reported by Steep. It comes with three variants:
-
steep:ignore
ignores any diagnostic reported at the line -
steep:ignore DIAGNOSTIC
ignores specific diagnostics at the line -
steep:ignore:start
andsteep:ignore:end
ignores diagnostics at a range of lines
# steep:ignore:start
foo() # NoMethod is detected, but ignored
bar() # NoMethod is detected, but ignored
# steep:ignore:end
foo() # steep:ignore
foo() # steep:ignore NoMethod
RBS 3.5 introduced a new syntax to define a method/block/proc to accept any arguments, without type checking. #1101 is to support the feature.
class Foo
# The dynamic method accepts any arguments, including block
def dynamic: (?) -> void
# The block parameters can be *untyped*
def dynamic_block: () { (?) -> void } -> void
end
# The proc type can has *untyped* params too
type dynamic_proc = ^(?) -> void
Steep 1.7 ships with rake tasks (#995, #1156).
Add the following lines to Rakefile
, and run rake steep
to type check your project.
require "steep/rake_task"
Steep::RakeTask.new do |t|
t.check.severity_level = :error
t.watch.verbose
end
We deleted sig
folder from the gem package that contains RBS type definition of Steep itself. We usually don't need them, because Steep is not a library. (You can require
some files technically, but no one assumes it makes some sense...)
We also deleted Gemfile
, Gemfile.lock
, and test scripts. It would silence some vulnerability scanners.