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

Document interaction of Style/AccessorGrouping and Sorbet [doc] #8828

Merged
merged 1 commit into from
Oct 1, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/modules/ROOT/pages/cops_style.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions lib/rubocop/cop/style/accessor_grouping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think AsciiDoc handles admonition markers properly if they are not UPCASE like NOTE.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks for letting me know.

# or disabling this cop.
#
# @example EnforcedStyle: grouped (default)
# # bad
# class Foo
Expand Down