rubocop-sorbet 0.6.9 → 0.6.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/config/default.yml +6 -0
- data/lib/rubocop/sorbet/version.rb +1 -1
- data/manual/cops.md +1 -0
- data/manual/cops_sorbet.md +22 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eda9e8cef015959394e43c9aa03ba35fd39ce07b629e285799c65670a1694b64
|
4
|
+
data.tar.gz: 9be1efcb8eaa30dcfe7fa1e9fb8a59ae73257392d78f432440d98566bb5e3333
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddb3cfc072f18d9d8a30db0429b8998e2c1971a5d662dcade2abdf51c3ee122d9e1db1e0ee1d43682ef2ed2459b11d9f40afc9fbdec8b429ba89f00cd24413dc
|
7
|
+
data.tar.gz: 4217f8c4cda4881cb7d89fd0c2644008f3f5fd41660bdb3aa7a647c9b8e1a69981a9522e2b47de4440d75bf5541544ce35c9b7a12b88ecaacb5a9182cd43c346
|
data/Gemfile.lock
CHANGED
data/config/default.yml
CHANGED
@@ -97,6 +97,12 @@ Sorbet/ForbidTUnsafe:
|
|
97
97
|
VersionAdded: 0.7.0
|
98
98
|
VersionChanged: 0.7.0
|
99
99
|
|
100
|
+
Sorbet/ForbidTUntyped:
|
101
|
+
Description: 'Forbid usage of T.untyped'
|
102
|
+
Enabled: false
|
103
|
+
VersionAdded: 0.6.9
|
104
|
+
VersionChanged: 0.7.0
|
105
|
+
|
100
106
|
Sorbet/ForbidUntypedStructProps:
|
101
107
|
Description: >-
|
102
108
|
Disallows use of `T.untyped` or `T.nilable(T.untyped)` as a
|
data/manual/cops.md
CHANGED
@@ -19,6 +19,7 @@ In the following section you find all available cops:
|
|
19
19
|
* [Sorbet/ForbidRBIOutsideOfAllowedPaths](cops_sorbet.md#sorbetforbidrbioutsideofallowedpaths)
|
20
20
|
* [Sorbet/ForbidSuperclassConstLiteral](cops_sorbet.md#sorbetforbidsuperclassconstliteral)
|
21
21
|
* [Sorbet/ForbidTUnsafe](cops_sorbet.md#sorbetforbidtunsafe)
|
22
|
+
* [Sorbet/ForbidTUntyped](cops_sorbet.md#sorbetforbidtuntyped)
|
22
23
|
* [Sorbet/ForbidUntypedStructProps](cops_sorbet.md#sorbetforbiduntypedstructprops)
|
23
24
|
* [Sorbet/HasSigil](cops_sorbet.md#sorbethassigil)
|
24
25
|
* [Sorbet/IgnoreSigil](cops_sorbet.md#sorbetignoresigil)
|
data/manual/cops_sorbet.md
CHANGED
@@ -274,7 +274,7 @@ Include | `**/*.rbi` | Array
|
|
274
274
|
|
275
275
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
|
276
276
|
--- | --- | --- | --- | ---
|
277
|
-
Disabled | Yes |
|
277
|
+
Disabled | Yes | Yes | 0.2.0 | 0.5.0
|
278
278
|
|
279
279
|
No documentation
|
280
280
|
|
@@ -284,7 +284,7 @@ Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChan
|
|
284
284
|
--- | --- | --- | --- | ---
|
285
285
|
Enabled | Yes | No | 0.6.1 | -
|
286
286
|
|
287
|
-
This cop makes sure that RBI files are always located under the defined allowed paths
|
287
|
+
This cop makes sure that RBI files are always located under the defined allowed paths.
|
288
288
|
|
289
289
|
Options:
|
290
290
|
|
@@ -341,6 +341,26 @@ T.unsafe(foo)
|
|
341
341
|
foo
|
342
342
|
```
|
343
343
|
|
344
|
+
## Sorbet/ForbidTUntyped
|
345
|
+
|
346
|
+
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
|
347
|
+
--- | --- | --- | --- | ---
|
348
|
+
Disabled | Yes | No | 0.6.9 | 0.7.0
|
349
|
+
|
350
|
+
This cop disallows using `T.untyped` anywhere.
|
351
|
+
|
352
|
+
### Examples
|
353
|
+
|
354
|
+
```ruby
|
355
|
+
# bad
|
356
|
+
sig { params(my_argument: T.untyped).void }
|
357
|
+
def foo(my_argument); end
|
358
|
+
|
359
|
+
# good
|
360
|
+
sig { params(my_argument: String).void }
|
361
|
+
def foo(my_argument); end
|
362
|
+
```
|
363
|
+
|
344
364
|
## Sorbet/ForbidUntypedStructProps
|
345
365
|
|
346
366
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
|