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 behavior of trailing empty lines for ExcessiveDocstringSpacing #1993

Merged

Conversation

corsonknowles
Copy link
Contributor

@corsonknowles corsonknowles commented Oct 30, 2024

While beginning setup to look at branch coverage for ExcessiveDocstringSpacing, I found this behavior and thought we might document it.

In this example, it autocorrects trailing empty lines without flagging them.


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Updated documentation.
  • Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

  • Added the new cop to config/default.yml.
  • The cop is configured as Enabled: pending in config/default.yml.
  • The cop is configured as Enabled: true in .rubocop.yml.
  • The cop documents examples of good and bad code.
  • The tests assert both that bad code is reported and that good code is not reported.
  • Set VersionAdded: "<<next>>" in default/config.yml.

If you have modified an existing cop's configuration options:

  • Set VersionChanged: "<<next>>" in config/default.yml.

@corsonknowles corsonknowles requested a review from a team as a code owner October 30, 2024 13:40
@corsonknowles corsonknowles changed the title Demonstrate that trailing empty lines are not cleaned up Demonstrate that trailing empty lines are not cleaned up by ExcessiveDocstringSpacing Oct 30, 2024
@corsonknowles corsonknowles marked this pull request as draft October 30, 2024 13:40
@corsonknowles corsonknowles changed the title Demonstrate that trailing empty lines are not cleaned up by ExcessiveDocstringSpacing Experiment with trailing empty lines forExcessiveDocstringSpacing Oct 30, 2024
@corsonknowles corsonknowles changed the title Experiment with trailing empty lines forExcessiveDocstringSpacing Experiment with trailing empty lines for ExcessiveDocstringSpacing Oct 30, 2024
@corsonknowles corsonknowles force-pushed the demonstrate_trailing_empty_line_behavior branch from c94358b to e0509b9 Compare October 30, 2024 13:43
@corsonknowles corsonknowles changed the title Experiment with trailing empty lines for ExcessiveDocstringSpacing Document behavior of trailing empty lines for ExcessiveDocstringSpacing Oct 30, 2024
@corsonknowles corsonknowles marked this pull request as ready for review October 30, 2024 19:05
@ydah
Copy link
Member

ydah commented Oct 31, 2024

Thank you!

@ydah ydah merged commit 00b6c03 into rubocop:master Oct 31, 2024
25 checks passed
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.

3 participants