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 #8372] Fix Lint/RedundantCopDisableDirective autocorrection removing a preceding newline incorrectly #8744

Conversation

dvandersluis
Copy link
Member

@dvandersluis dvandersluis commented Sep 18, 2020

First fix for #8372 (I split it into two PRs since it touches two cops), fixes Lint/RedundantCopDisableDirective autocorrection so that it doesn't clobber blank lines. There were no tests previously for autocorrection, so this change also adds tests to ensure whitespace is managed correctly.


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.

…tion removing a preceding newline incorrectly.

There were no tests previously for autocorrection, so this change also adds tests to ensure whitespace is managed correctly.
@dvandersluis dvandersluis force-pushed the fix-redundant-cop-disable-directive-autocomplete branch from fd8fbb2 to 5536d63 Compare September 22, 2020 16:19
@bbatsov bbatsov merged commit b59c48a into rubocop:master Sep 23, 2020
@bbatsov
Copy link
Collaborator

bbatsov commented Sep 23, 2020

Thanks!

@dvandersluis dvandersluis deleted the fix-redundant-cop-disable-directive-autocomplete branch January 18, 2021 20:39
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