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
Add CountAsOne
config option to RSpec/ExampleLength
#1139
Conversation
CountAsOne
config option to RSpec/ExampleLength
CountAsOne
config option to RSpec/ExampleLengthCountAsOne
config option to RSpec/ExampleLength
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
I was missing a link to the CodeLength module when reviewing this, so here it is :-)
I realized that I forgot to adapt specs to ExampleLength: expect_no_offenses(<<~RUBY)
module Test
...
I fixed to: expect_no_offenses(<<~RUBY)
it do
...
Sorry hehe. |
If you rebase on master, the edge tests should pass on CI. |
Done @bquorning. Thanks. |
To add
CountAsOne
configuration I had to adapt ExampleLength cop to useCodeLength
methods likeMetrics/BlockLength
,Metrics/MethodLength
,Metrics/ClassLength
already uses.Before submitting the PR make sure the following are checked:
master
(if not - rebase it).CHANGELOG.md
if the new code introduces user-observable changes.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:
config/default.yml
.Enabled: pending
inconfig/default.yml
.VersionAdded
indefault/config.yml
to the next minor version.If you have modified an existing cop's configuration options:
VersionChanged
inconfig/default.yml
to the next major version.