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

[Fix #11585] Support AllowedMethods for Style/DocumentationMethod #12893

Conversation

koic
Copy link
Member

@koic koic commented May 9, 2024

Fixes #11585.

This PR supports AllowedMethods for Style/DocumentationMethod.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@@ -993,6 +993,19 @@ def foo.baz
end
end
end

describe 'when AllowedConstants is configured' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

AllowedConstants -> AllowedMethods

describe 'when AllowedConstants is configured' do
before { config['Style/DocumentationMethod'] = { 'AllowedMethods' => ['method_missing'] } }

it 'ignores the constants in the config' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

constants -> methods

@bbatsov
Copy link
Collaborator

bbatsov commented May 20, 2024

@koic ping :-)

…Method`

Fixes rubocop#11585.

This PR supports `AllowedMethods` for `Style/DocumentationMethod`.
@koic koic force-pushed the support_allowed_methods_for_style_documentation_method branch from bb7b513 to 1de0739 Compare May 20, 2024 09:00
@koic
Copy link
Member Author

koic commented May 20, 2024

@bbatsov I've updated this PR. Thank you for your review!

@bbatsov bbatsov merged commit e76ccad into rubocop:master May 20, 2024
34 checks passed
@bbatsov
Copy link
Collaborator

bbatsov commented May 20, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style/DocumentationMethod should support AllowedMethods attribute
2 participants