Skip to content

Commit

Permalink
Merge pull request #206 from Shopify/deprecate-one-ancestor-per-line
Browse files Browse the repository at this point in the history
  • Loading branch information
sambostock authored Apr 16, 2024
2 parents d6f0206 + c517b7f commit 2cfb6cc
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 324 deletions.
5 changes: 0 additions & 5 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,6 @@ Sorbet/BuggyObsoleteStrictMemoization:
Safe: true
SafeAutoCorrect: false

Sorbet/OneAncestorPerLine:
Description: 'Enforces one ancestor per call to requires_ancestor'
Enabled: false
VersionAdded: '0.6.0'

Sorbet/RedundantExtendTSig:
Description: >-
Forbid the usage of redundant `extend T::Sig`.
Expand Down
4 changes: 3 additions & 1 deletion config/obsoletion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
#
# See: https://docs.rubocop.org/rubocop/extensions.html#config-obsoletions
#
{}
removed:
Sorbet/OneAncestorPerLine:
reason: '`require_ancestor` now takes a block instead of arguments'
80 changes: 0 additions & 80 deletions lib/rubocop/cop/sorbet/one_ancestor_per_line.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/rubocop/cop/sorbet_cops.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
require_relative "sorbet/forbid_type_aliased_shapes"
require_relative "sorbet/forbid_untyped_struct_props"
require_relative "sorbet/implicit_conversion_method"
require_relative "sorbet/one_ancestor_per_line"
require_relative "sorbet/callback_conditionals_binding"
require_relative "sorbet/forbid_t_struct"
require_relative "sorbet/forbid_t_unsafe"
Expand Down
1 change: 0 additions & 1 deletion manual/cops.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ In the following section you find all available cops:
* [Sorbet/KeywordArgumentOrdering](cops_sorbet.md#sorbetkeywordargumentordering)
* [Sorbet/MultipleTEnumValues](cops_sorbet.md#sorbetmultipletenumvalues)
* [Sorbet/ObsoleteStrictMemoization](cops_sorbet.md#sorbetobsoletestrictmemoization)
* [Sorbet/OneAncestorPerLine](cops_sorbet.md#sorbetoneancestorperline)
* [Sorbet/RedundantExtendTSig](cops_sorbet.md#sorbetredundantextendtsig)
* [Sorbet/SignatureBuildOrder](cops_sorbet.md#sorbetsignaturebuildorder)
* [Sorbet/SingleLineRbiClassModuleDefinitions](cops_sorbet.md#sorbetsinglelinerbiclassmoduledefinitions)
Expand Down
24 changes: 0 additions & 24 deletions manual/cops_sorbet.md
Original file line number Diff line number Diff line change
Expand Up @@ -703,30 +703,6 @@ def foo
end
```
## Sorbet/OneAncestorPerLine
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
--- | --- | --- | --- | ---
Disabled | Yes | Yes | 0.6.0 | -
Ensures one ancestor per requires_ancestor line
rather than chaining them as a comma-separated list.
### Examples
```ruby
# bad
module SomeModule
requires_ancestor Kernel, Minitest::Assertions
end
# good
module SomeModule
requires_ancestor Kernel
requires_ancestor Minitest::Assertions
end
```
## Sorbet/RedundantExtendTSig
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
Expand Down
212 changes: 0 additions & 212 deletions spec/rubocop/cop/sorbet/one_ancestor_per_line_spec.rb

This file was deleted.

0 comments on commit 2cfb6cc

Please sign in to comment.