Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete Sorbet/OneAncestorPerLine cop #206

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -30,7 +30,6 @@ In the following section you find all available cops:
* [Sorbet/ImplicitConversionMethod](cops_sorbet.md#sorbetimplicitconversionmethod)
* [Sorbet/KeywordArgumentOrdering](cops_sorbet.md#sorbetkeywordargumentordering)
* [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 @@ -676,30 +676,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.

Loading