Class: RuboCop::Cop::Sorbet::ForbidSigWithRuntime
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Sorbet::ForbidSigWithRuntime
- Includes:
- SignatureHelp
- Defined in:
- lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb
Overview
Check that definitions do not use a ‘sig` block.
Good:
“‘ #: -> void def foo; end “`
Bad:
“‘ T::Sig.sig { void } def foo; end “`
Constant Summary collapse
- MSG =
"Do not use `T::Sig.sig`."
Instance Method Summary collapse
Methods included from SignatureHelp
#bare_sig?, #on_block, #sig_with_runtime?, #sig_without_runtime?, #signature?
Instance Method Details
#on_signature(node) ⇒ Object
28 29 30 |
# File 'lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb', line 28 def on_signature(node) add_offense(node) if sig_with_runtime?(node) end |