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

Allow Generator to take version_added parameter #7897

Merged
merged 1 commit into from
May 9, 2020

Conversation

tejasbubane
Copy link
Contributor

@tejasbubane tejasbubane commented Apr 20, 2020

Other libraries like rubocop-rspec which rely on rubocop's generator
will be able to provide in their own version to be used in generated config.

example: rubocop/rubocop-rspec#905


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.

tejasbubane added a commit to tejasbubane/rubocop-rspec that referenced this pull request Apr 29, 2020
Default rake task for creating new cop adds rubocop's version to
config file, use rubocop-rspec's version instead.

Waiting for rubocop/rubocop#7897 to be merged.
Other libraries like `rubocop-rspec` which rely on rubocop's generator
will be able to provide in their own version.
@pirj
Copy link
Member

pirj commented Apr 29, 2020

To clarify: currently, if run from rubocop-rspec, rake new_cop[RSpec/Abc] generates the following in rubocop-rspec's config/default.yml:

RSpec/Abc:
  Description: 'TODO: Write a description of the cop.'
  Enabled: pending
  VersionAdded: '0.83'

While RuboCop RSpec's current version is 1.38.1, and VersionAdded should be 1.38.2.

@tejasbubane
Copy link
Contributor Author

Not sure why circleci is failing here.

@pirj
Copy link
Member

pirj commented Apr 29, 2020

Seems to be a temporary failure, please re-run retrigger the build 🤞

@pirj
Copy link
Member

pirj commented May 9, 2020

Good to merge?

@koic
Copy link
Member

koic commented May 9, 2020

I'll merge this one.

@koic koic merged commit bea4bf1 into rubocop:master May 9, 2020
@tejasbubane tejasbubane deleted the generator-version-added branch May 10, 2020 06:36
tejasbubane added a commit to tejasbubane/rubocop-rspec that referenced this pull request May 10, 2020
Default rake task for creating new cop adds rubocop's version to
config file, use rubocop-rspec's version instead.

Waiting for rubocop/rubocop#7897 to be merged.
mockdeep pushed a commit to mockdeep/rubocop-rspec that referenced this pull request Jun 14, 2020
Default rake task for creating new cop adds rubocop's version to
config file, use rubocop-rspec's version instead.

Waiting for rubocop/rubocop#7897 to be merged.
koic added a commit to rubocop/rubocop-rails that referenced this pull request Aug 1, 2020
koic added a commit to rubocop/rubocop-performance that referenced this pull request Aug 1, 2020
renawatson68 added a commit to renawatson68/performance-develop-rubyonrails that referenced this pull request Sep 23, 2022
richardstewart0213 added a commit to richardstewart0213/performance-build-Performance-optimization-analysis- that referenced this pull request Nov 4, 2022
pirj pushed a commit to rubocop/rubocop-capybara that referenced this pull request Dec 29, 2022
Default rake task for creating new cop adds rubocop's version to
config file, use rubocop-rspec's version instead.

Waiting for rubocop/rubocop#7897 to be merged.
ydah pushed a commit to rubocop/rubocop-factory_bot that referenced this pull request Apr 13, 2023
Default rake task for creating new cop adds rubocop's version to
config file, use rubocop-rspec's version instead.

Waiting for rubocop/rubocop#7897 to be merged.
MarttiCheng added a commit to MarttiCheng/Rubocop-Performance that referenced this pull request Sep 28, 2023
SerhiiMisiura added a commit to SerhiiMisiura/Rubocop-Performance that referenced this pull request Oct 5, 2023
ydah pushed a commit to rubocop/rubocop-rspec_rails that referenced this pull request Mar 27, 2024
Default rake task for creating new cop adds rubocop's version to
config file, use rubocop-rspec's version instead.

Waiting for rubocop/rubocop#7897 to be merged.
ydah pushed a commit to rubocop/rubocop-rspec_rails that referenced this pull request Mar 27, 2024
Default rake task for creating new cop adds rubocop's version to
config file, use rubocop-rspec's version instead.

Waiting for rubocop/rubocop#7897 to be merged.
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

3 participants