rubocop-sorbet 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d705f397454c9a1658a3fc81f98df969c2ca5d5119924404f9195d3e878d6119
4
- data.tar.gz: 62f7e2f18940530a2a757b0c085463b8462edceb8c2f987f4038c3d71ff8fd0e
3
+ metadata.gz: 0df763a5f1ab8de8024c732f5e3fae7d31d21e13c807fceca5c0d8c674e52d46
4
+ data.tar.gz: 36fb28afefdb665eb471bb536be012b5123efe5e19ef1ddf61415c21a6aa5892
5
5
  SHA512:
6
- metadata.gz: cf74e543eb073e9db8fd3f38a0914124d06fd8b586eda66da33376486998d94f0c735ad31c3cbc32b4fc6f436a4f1288f9f232e32c1a014389969f7101f58d72
7
- data.tar.gz: 4aab7f7d8e47a91ea405042143a04252218b66ec264969a11494d695f66ad1583d9d362d1dfe9c7a15b8084a92ceb00df565345b047265ed8068eadb2abadcca
6
+ metadata.gz: 80f5462984070d3194ad111484b5a4f40905b9ba65ab55f95b050915a8df7fa2c2e54d30a7771738f7bb5e9c26dac8568c36a90c3e854dabb14240b255759c64
7
+ data.tar.gz: 66ed0ca23fa3b76a372fdae99273af7e037e3f0de5b437fc8a4d35ad024da31d0cd174c0afb12c0176c8b111d2b73be7be9960611f9176d58d46825e5c702015
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-sorbet (0.5.0)
4
+ rubocop-sorbet (0.5.1)
5
5
  rubocop
6
6
 
7
7
  GEM
@@ -17,7 +17,7 @@ module RuboCop
17
17
  # FooOrBar = T.type_alias { T.any(Foo, Bar) }
18
18
  class BindingConstantWithoutTypeAlias < RuboCop::Cop::Cop
19
19
  def_node_matcher(:binding_unaliased_type?, <<-PATTERN)
20
- (casgn _ _ [#not_nil? #not_t_let? #not_generic_parameter_decl? #method_needing_aliasing_on_t?])
20
+ (casgn _ _ [#not_nil? #not_t_let? #not_dynamic_type_creation_with_block? #not_generic_parameter_decl? #method_needing_aliasing_on_t?])
21
21
  PATTERN
22
22
 
23
23
  def_node_matcher(:using_type_alias?, <<-PATTERN)
@@ -48,6 +48,15 @@ module RuboCop
48
48
  )
49
49
  PATTERN
50
50
 
51
+ def_node_matcher(:dynamic_type_creation_with_block?, <<-PATTERN)
52
+ (block
53
+ (send
54
+ const :new ...)
55
+ _
56
+ _
57
+ )
58
+ PATTERN
59
+
51
60
  def_node_matcher(:generic_parameter_decl?, <<-PATTERN)
52
61
  (
53
62
  send nil? {:type_template :type_member} ...
@@ -67,6 +76,10 @@ module RuboCop
67
76
  !t_let?(node)
68
77
  end
69
78
 
79
+ def not_dynamic_type_creation_with_block?(node)
80
+ !dynamic_type_creation_with_block?(node)
81
+ end
82
+
70
83
  def not_generic_parameter_decl?(node)
71
84
  !generic_parameter_decl?(node)
72
85
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module RuboCop
3
3
  module Sorbet
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-sorbet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ufuk Kayserilioglu
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2020-10-01 00:00:00.000000000 Z
14
+ date: 2020-10-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec