Skip to content

Commit

Permalink
Merge branch 'master' into pending_with_arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
bquorning committed Apr 28, 2021
2 parents e30b0c3 + 3538c8f commit d0370d6
Show file tree
Hide file tree
Showing 226 changed files with 2,363 additions and 1,478 deletions.
13 changes: 8 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
key: bundle-v2-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run: rake internal_investigation spec
- run: bundle exec rake internal_investigation spec

code-climate:
docker:
Expand All @@ -72,7 +72,9 @@ jobs:
- run:
name: Setup Code Climate test-reporter
command: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
curl -L \
https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > \
./cc-test-reporter
chmod +x ./cc-test-reporter
- run:
name: Run specs
Expand All @@ -87,17 +89,18 @@ workflows:
jobs:
- confirm_config_and_documentation

# Use `requires: [confirm_config_and_documentation]` to trick Circle CI into starting the slow jruby job early.
# Use `requires: [confirm_config_and_documentation]` to trick Circle CI into starting the slow
# jruby job early.
- rspec:
requires: [confirm_config_and_documentation]
matrix:
parameters:
ruby: ['2.4', '2.5', '2.6', '2.7']
ruby: ['2.5', '2.6', '2.7', '3.0']
- rubocop:
requires: [confirm_config_and_documentation]
matrix:
parameters:
ruby: ['2.4', '2.5', '2.6', '2.7']
ruby: ['2.5', '2.6', '2.7', '3.0']
- edge-rubocop:
requires: [confirm_config_and_documentation]
- jruby
Expand Down
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

If you encounter problems or have ideas for improvements or new features, please report them to the [issue tracker](https://github.com/rubocop-hq/rubocop-rspec/issues) or submit a pull request. Please, try to follow these guidelines when you do so.
If you encounter problems or have ideas for improvements or new features, please report them to the [issue tracker](https://github.com/rubocop/rubocop-rspec/issues) or submit a pull request. Please, try to follow these guidelines when you do so.

## Issue reporting

Expand All @@ -18,7 +18,7 @@ If you encounter problems or have ideas for improvements or new features, please
2. Create a feature branch.
3. Make sure to add tests.
4. Make sure the test suite passes (run `rake`).
5. Add a [changelog](https://github.com/rubocop-hq/rubocop-rspec/blob/master/CHANGELOG.md) entry.
5. Add a [changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md) entry.
6. Commit your changes.
7. Push to the branch.
8. Create new Pull Request.
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Linting
on:
- pull_request
jobs:
yamllint:
name: Yamllint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Yamllint
uses: karancode/yamllint-github-action@master
with:
yamllint_comment: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 6 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-performance
- rubocop-rspec
- rubocop/cop/internal_affairs
- rubocop-performance
- rubocop-rspec
- rubocop/cop/internal_affairs

AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.4
NewCops: enable
TargetRubyVersion: 2.5
NewCops: disable
Exclude:
- 'vendor/**/*'
- 'spec/fixtures/**/*'
- 'tmp/**/*'
- 'spec/smoke_tests/**/*.rb'

# See https://github.com/rubocop-hq/rubocop/issues/6410
# See https://github.com/rubocop/rubocop/issues/6410
Layout/HashAlignment:
Enabled: false

Expand Down
4 changes: 4 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 106

RSpec/ExampleLength:
Exclude:
- spec/rubocop/cop/rspec/factory_bot/attribute_defined_statically_spec.rb
11 changes: 11 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: default

rules:
comments:
min-spaces-from-content: 1
document-start: disable
line-length:
allow-non-breakable-inline-mappings: true
max: 100
truthy:
check-keys: false
54 changes: 49 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,53 @@
# Change log
# Changelog

## Master (Unreleased)

* Allow `RSpec/ContextWording` to accept multi-word prefixes. ([@hosamaly][])
* Drop support for ruby 2.4. ([@bquorning][])
* Add `CountAsOne` configuration option to `RSpec/ExampleLength`. ([@stephannv][])
* Fix a false positive for `RSpec/RepeatedExampleGroupBody` when `pending` or `skip` have argument(s). ([@Tietew][])

## 2.2.0 (2021-02-02)

* Fix `HooksBeforeExamples`, `LeadingSubject`, `LetBeforeExamples` and `ScatteredLet` autocorrection to take into account inline comments and comments immediately before the moved node. ([@Darhazer][])
* Improve rubocop-rspec performance. ([@Darhazer][], [@bquorning][])
* Include `Enabled: true` to prevent a mismatched configuration parameter warning when `RSpec` cops are explicitly enabled in the user configuration. ([@pirj][])

## 2.1.0 (2020-12-17)

* Fix `RSpec/FilePath` false positive for relative file path runs with long namespaces. ([@ahukkanen][])
* Update `RSpec/Focus` to have auto-correction. ([@dvandersluis][])

## 2.0.1 (2020-12-02)

* Fixed infinite loop in `RSpec/ExpectActual` autocorrection when both expected and actual values are literals. ([@Darhazer][])

## 2.0.0 (2020-11-06)

* Remove deprecated class `::RuboCop::Cop::RSpec::Cop`. ([@bquorning][])
* Retire `RSpec/InvalidPredicateMatcher` cop. ([@pirj][])
* Remove the code responsible for filtering files to inspect. ([@pirj][])
* Make RSpec language elements configurable. ([@sl4vr][])
* Remove `CustomIncludeMethods` `RSpec/EmptyExampleGroup` option in favour of the new RSpec DSL configuration. ([@pirj][])
* Enabled pending cop (`RSpec/StubbedMock`). ([@pirj][])

## 2.0.0.pre (2020-10-22)

* Update RuboCop dependency to v1.0.0. ([@bquorning][])
* Change namespace of several cops (`Capybara/*` -> `RSpec/Capybara/*`, `FactoryBot/*` -> `RSpec/FactoryBot/*`, `Rails/*` -> `RSpec/Rails/*`). ([@pirj][], [@bquorning][])

## 1.44.1 (2020-10-20)

* Relax `rubocop-ast` version constraint. ([@PhilCoggins][])

## 1.44.0 (2020-10-20)

* Move our documentation from rubocop-rspec.readthedocs.io to docs.rubocop.org/rubocop-rspec. ([@bquorning][])
* Add `RSpec/RepeatedIncludeExample` cop. ([@biinari][])
* Add `RSpec/StubbedMock` cop. ([@bquorning][], [@pirj][])
* Add `IgnoredMetadata` configuration option to `RSpec/DescribeClass`. ([@Rafix02][])
* Fix false positives in `RSpec/EmptyExampleGroup`. ([@pirj][])
* Fix a false positive for `RSpec/EmptyExampleGroup` when example is defined in an `if` branch. ([@koic][])
* Fix a false positive for `RSpec/RepeatedExampleGroupBody` when `pending` or `skip` have argument(s). ([@Tietew][])

## 1.43.2 (2020-08-25)

Expand Down Expand Up @@ -514,8 +553,8 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
[@rspeicher]: https://github.com/rspeicher
[@jonatas]: https://github.com/jonatas
[@pocke]: https://github.com/pocke
[@bmorrall]: https:/github.com/bmorrall
[@zverok]: https:/github.com/zverok
[@bmorrall]: https://github.com/bmorrall
[@zverok]: https://github.com/zverok
[@timrogers]: https://github.com/timrogers
[@yevhene]: https://github.com/yevhene
[@walf443]: https://github.com/walf443
Expand Down Expand Up @@ -560,10 +599,15 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
[@andrykonchin]: https://github.com/andrykonchin
[@harrylewis]: https://github.com/harrylewis
[@elliterate]: https://github.com/elliterate
[@mlarraz]: https://github.com/mlarraz
[@jtannas]: https://github.com/jtannas
[@mockdeep]: https://github.com/mockdeep
[@biinari]: https://github.com/biinari
[@koic]: https://github.com/koic
[@Rafix02]: https://github.com/Rafix02
[@PhilCoggins]: https://github.com/PhilCoggins
[@sl4vr]: https://github.com/sl4vr
[@ahukkanen]: https://github.com/ahukkanen
[@dvandersluis]: https://github.com/dvandersluis
[@hosamaly]: https://github.com/hosamaly
[@stephannv]: https://github.com/stephannv
[@Tietew]: https://github.com/Tietew
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[![Join the chat at https://gitter.im/rubocop-rspec/Lobby](https://badges.gitter.im/rubocop-rspec/Lobby.svg)](https://gitter.im/rubocop-rspec/Lobby)
[![Gem Version](https://badge.fury.io/rb/rubocop-rspec.svg)](https://rubygems.org/gems/rubocop-rspec)
[![CircleCI](https://circleci.com/gh/rubocop-hq/rubocop-rspec.svg?style=svg)](https://circleci.com/gh/rubocop-hq/rubocop-rspec)
[![CircleCI](https://circleci.com/gh/rubocop/rubocop-rspec.svg?style=svg)](https://circleci.com/gh/rubocop/rubocop-rspec)
[![Test Coverage](https://api.codeclimate.com/v1/badges/8ffaabf633c968c22bdd/test_coverage)](https://codeclimate.com/github/rubocop-hq/rubocop-rspec/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/8ffaabf633c968c22bdd/maintainability)](https://codeclimate.com/github/rubocop-hq/rubocop-rspec/maintainability)

RSpec-specific analysis for your projects, as an extension to
[RuboCop](https://github.com/rubocop-hq/rubocop).
[RuboCop](https://github.com/rubocop/rubocop).

## Installation

Expand All @@ -23,6 +23,10 @@ or if you use bundler put this in your `Gemfile`
gem 'rubocop-rspec', require: false
```

### Upgrading to RuboCop RSpec v2.x

Read all the details in our [Upgrade to Version 2.x](https://docs.rubocop.org/rubocop-rspec/2.0/upgrade_to_version_2.html) document.

## Usage

You need to tell RuboCop to load the RSpec extension. There are three
Expand Down Expand Up @@ -67,7 +71,7 @@ rubocop-rspec is available on Code Climate as part of the rubocop engine. [Learn

## Documentation

You can read more about RuboCop-RSpec in its [official manual](https://docs.rubocop.org/rubocop-rspec).
You can read more about RuboCop RSpec in its [official manual](https://docs.rubocop.org/rubocop-rspec).

## The Cops

Expand Down
Loading

0 comments on commit d0370d6

Please sign in to comment.