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 #8759] Fix multiple offense detection for Style/RaiseArgs #8810

Merged
merged 1 commit into from Sep 30, 2020

Conversation

pbernays
Copy link
Contributor

@pbernays pbernays commented Sep 29, 2020

The use of opposite_style_detected prevents cops from detecting
subsequent offenses once the first correct style has been detected.

Related to #8809, #8802, and #8800.


Before submitting the PR make sure the following are checked:

  • 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.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

@pbernays
Copy link
Contributor Author

The specs remove some expectations around what the cop's config_to_allow_offenses value gets changed to. These specs well-and-truly pre-date the regression, but I don't know what the original intent was. I could use some guidance around those particulars please.

CHANGELOG.md Outdated
@@ -4,6 +4,7 @@

### New features

* [#8810](https://github.com/rubocop-hq/rubocop/pull/8810): Fix multiple offense detection for Style/RaiseArgs. ([@pbernays][])
Copy link
Member

Choose a reason for hiding this comment

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

Can you create ### Bug fixes header and move this entry there?

 ### New features

 * [#8796](https://github.com/rubocop-hq/rubocop/pull/8796): Add new `Lint/HashCompareByIdentity` cop. ([@fatkodima][])
+
+### Bug fixes
+
+* [#8810](https://github.com/rubocop-hq/rubocop/pull/8810): Fix multiple offense detection for Style/RaiseArgs. ([@pbernays][])

 ## 0.92.0 (2020-09-25)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can do

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for the updating.
One more point. Can you rebase with the latest master branch to resolve the changelog conflict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

The use of opposite_style_detected prevents cops from detecting
subsequent offenses once the first correct style has been detected.
@koic koic merged commit 3fd227f into rubocop:master Sep 30, 2020
@koic
Copy link
Member

koic commented Sep 30, 2020

Thank you for the fixing including the reproduction test!

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.

None yet

2 participants