From fc8721d352de0b9f295ca17f30de3b1921172153 Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Thu, 1 Oct 2020 18:17:13 -0400 Subject: [PATCH] Document interaction of `Style/AccessorGrouping` and `Sorbet` [doc] See https://github.com/rubocop-hq/rubocop/pull/8241#issuecomment-702304766 --- docs/modules/ROOT/pages/cops_style.adoc | 3 +++ lib/rubocop/cop/style/accessor_grouping.rb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/modules/ROOT/pages/cops_style.adoc b/docs/modules/ROOT/pages/cops_style.adoc index 3d538d9a046..2522c37cd9d 100644 --- a/docs/modules/ROOT/pages/cops_style.adoc +++ b/docs/modules/ROOT/pages/cops_style.adoc @@ -120,6 +120,9 @@ This cop checks for grouping of accessors in `class` and `module` bodies. By default it enforces accessors to be placed in grouped declarations, but it can be configured to enforce separating them in multiple declarations. +Note: `Sorbet` is not compatible with "grouped" style. Consider "separated" style +or disabling this cop. + === Examples ==== EnforcedStyle: grouped (default) diff --git a/lib/rubocop/cop/style/accessor_grouping.rb b/lib/rubocop/cop/style/accessor_grouping.rb index 61c83bc8ccf..4da6a6e4785 100644 --- a/lib/rubocop/cop/style/accessor_grouping.rb +++ b/lib/rubocop/cop/style/accessor_grouping.rb @@ -7,6 +7,9 @@ module Style # By default it enforces accessors to be placed in grouped declarations, # but it can be configured to enforce separating them in multiple declarations. # + # Note: `Sorbet` is not compatible with "grouped" style. Consider "separated" style + # or disabling this cop. + # # @example EnforcedStyle: grouped (default) # # bad # class Foo