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

Accept pending cops in the development build #7664

Merged
merged 1 commit into from Jan 25, 2020

Conversation

koic
Copy link
Member

@koic koic commented Jan 23, 2020

Follow up of #7646 (comment).

This PR accepts pending cops in the development build.

Some tests fail with the following warnings when using the Enabled: pending status.

% bundle exec rake spec
(snip)

1) RuboCop::CLI --only when one cop is given accepts cop names from
plugins
     Failure/Error: raise output

     RuntimeError:
       The following cops were added to RuboCop, but are not
configured. Please set Enabled to either `true` or `false` in your
`.rubocop.yml` file:
        - Style/ZeroLengthPredicate
       Inspecting 2 files
       ..

       2 files inspected, no offenses detected
     # ./spec/rubocop/cli/cli_options_spec.rb:213:in `block (4 levels)
in <top (required)>'
     # ./spec/support/cli_spec_behavior.rb:26:in `block (2 levels) in
<top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:29:in `block (4 levels) in
<top (required)>'
     # ./lib/rubocop/path_util.rb:67:in `chdir'
     # ./lib/rubocop/path_util.rb:67:in `chdir'
     # ./lib/rubocop/rspec/shared_contexts.rb:28:in `block (3 levels) in
<top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:8:in `block (2 levels) in
<top (required)>'

This PR prevents those tests from catching a pending cop warning.
OTOH, this PR supplements the E2E test for a pending cop warning.


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.

Follow up of rubocop#7646 (comment).

This PR accepts pending cops in the development build.

Some tests fail with the following warnings when using the
`Enabled: pending` status.

```console
% bundle exec rake spec
(snip)

1) RuboCop::CLI --only when one cop is given accepts cop names from
plugins
     Failure/Error: raise output

     RuntimeError:
       The following cops were added to RuboCop, but are not
configured. Please set Enabled to either `true` or `false` in your
`.rubocop.yml` file:
        - Style/ZeroLengthPredicate
       Inspecting 2 files
       ..

       2 files inspected, no offenses detected
     # ./spec/rubocop/cli/cli_options_spec.rb:213:in `block (4 levels)
in <top (required)>'
     # ./spec/support/cli_spec_behavior.rb:26:in `block (2 levels) in
<top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:29:in `block (4 levels) in
<top (required)>'
     # ./lib/rubocop/path_util.rb:67:in `chdir'
     # ./lib/rubocop/path_util.rb:67:in `chdir'
     # ./lib/rubocop/rspec/shared_contexts.rb:28:in `block (3 levels) in
<top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:8:in `block (2 levels) in
<top (required)>'
```

This PR prevents those tests from catching a pending cop warning.
OTOH, this PR supplements the E2E test for a pending cop warning.
@bbatsov bbatsov merged commit c675fa9 into rubocop:master Jan 25, 2020
@bbatsov
Copy link
Collaborator

bbatsov commented Jan 25, 2020

Thanks!

@koic koic deleted the fix_an_error_when_using_pending_status branch January 25, 2020 12:44
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