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

Support auto-correct for Style/SingleLineBlockParams #9167

Conversation

koic
Copy link
Member

@koic koic commented Dec 5, 2020

This PR supports auto-correct for Style/SingleLineBlockParams.


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.

This PR supports auto-correct for `Style/SingleLineBlockParams`.
@bbatsov bbatsov merged commit 862951e into rubocop:master Dec 5, 2020
@bbatsov
Copy link
Collaborator

bbatsov commented Dec 5, 2020

Nice! 🙇‍♂️

@koic koic deleted the support_autocorrect_for_style_single_line_block_params branch December 5, 2020 07:50
koic added a commit to koic/rubocop that referenced this pull request Dec 5, 2020
Follow rubocop#9167.

This PR adds the following project spec and
renames the incorrect unreleased entry filename of rubocop#9167.

```console
% bundle exec rspec spec/project_spec.rb:239

Randomized with seed 30085
.F

Failures:

  1) RuboCop Project Changelog future entries For
  /Users/koic/src/github.com/rubocop-hq/rubocop/spec/../changelog/
support_autocorrect_for_style_single_line_block_params.md
  starts with `new_`, `fix_`, or `change_`
     Failure/Error:
  expect(File.basename(path)).to(match(/\A(new|fix|change)_.+/))

       expected
       "support_autocorrect_for_style_single_line_block_params.md" to
       match /\A(new|fix|change)_.+/
       Diff:
       @@ -1 +1 @@
       -/\A(new|fix|change)_.+/
       +"support_autocorrect_for_style_single_line_block_params.md"

     # ./spec/project_spec.rb:240:in `block (6 levels) in
       <top (required)>'

Finished in 0.01424 seconds (files took 1.53 seconds to load)
2 examples, 1 failure

Failed examples:

rspec './spec/project_spec.rb[1:3:4:2:5]' # RuboCop Project Changelog
future entries For
/Users/koic/src/github.com/rubocop-hq/rubocop/spec/../changelog/
support_autocorrect_for_style_single_line_block_params.md
starts with `new_`, `fix_`, or `change_`
```
bbatsov pushed a commit that referenced this pull request Dec 5, 2020
Follow #9167.

This PR adds the following project spec and
renames the incorrect unreleased entry filename of #9167.

```console
% bundle exec rspec spec/project_spec.rb:239

Randomized with seed 30085
.F

Failures:

  1) RuboCop Project Changelog future entries For
  /Users/koic/src/github.com/rubocop-hq/rubocop/spec/../changelog/
support_autocorrect_for_style_single_line_block_params.md
  starts with `new_`, `fix_`, or `change_`
     Failure/Error:
  expect(File.basename(path)).to(match(/\A(new|fix|change)_.+/))

       expected
       "support_autocorrect_for_style_single_line_block_params.md" to
       match /\A(new|fix|change)_.+/
       Diff:
       @@ -1 +1 @@
       -/\A(new|fix|change)_.+/
       +"support_autocorrect_for_style_single_line_block_params.md"

     # ./spec/project_spec.rb:240:in `block (6 levels) in
       <top (required)>'

Finished in 0.01424 seconds (files took 1.53 seconds to load)
2 examples, 1 failure

Failed examples:

rspec './spec/project_spec.rb[1:3:4:2:5]' # RuboCop Project Changelog
future entries For
/Users/koic/src/github.com/rubocop-hq/rubocop/spec/../changelog/
support_autocorrect_for_style_single_line_block_params.md
starts with `new_`, `fix_`, or `change_`
```
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