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

[Fix #8165] Require Parser gem 2.7.1.5 #8785

Merged
merged 2 commits into from Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@

* [#8774](https://github.com/rubocop-hq/rubocop/issues/8774): Fix a false positive for `Layout/ArrayAlignment` with parallel assignment. ([@dvandersluis][])

### Changes

* [#8785](https://github.com/rubocop-hq/rubocop/pull/8785): Update TargetRubyVersion 2.8 to 3.0 (experimental). ([@em-gazelle][])

## 0.91.1 (2020-09-23)

### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/compatibility.adoc
Expand Up @@ -30,7 +30,7 @@ The following table is the support matrix.
| 2.5 | -
| 2.6 | -
| 2.7 | -
| 2.8 (experimental) | -
| 3.0 (experimental) | -
|===

NOTE: The compatibility xref:configuration.adoc#setting-the-target-ruby-version[target Ruby version mentioned here] is about code analysis (what RuboCop can analyze), not runtime (is RuboCop capable of running on some Ruby or not).
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/target_ruby.rb
Expand Up @@ -4,7 +4,7 @@ module RuboCop
# The kind of Ruby that code inspected by RuboCop is written in.
# @api private
class TargetRuby
KNOWN_RUBIES = [2.4, 2.5, 2.6, 2.7, 2.8].freeze
KNOWN_RUBIES = [2.4, 2.5, 2.6, 2.7, 3.0].freeze
DEFAULT_VERSION = KNOWN_RUBIES.first

OBSOLETE_RUBIES = {
Expand Down
4 changes: 2 additions & 2 deletions rubocop.gemspec
Expand Up @@ -34,11 +34,11 @@ Gem::Specification.new do |s|
}

s.add_runtime_dependency('parallel', '~> 1.10')
s.add_runtime_dependency('parser', '>= 2.7.1.1')
s.add_runtime_dependency('parser', '>= 2.7.1.5')
s.add_runtime_dependency('rainbow', '>= 2.2.2', '< 4.0')
s.add_runtime_dependency('regexp_parser', '>= 1.7')
s.add_runtime_dependency('rexml')
s.add_runtime_dependency('rubocop-ast', '>= 0.4.0', '< 1.0')
s.add_runtime_dependency('rubocop-ast', '>= 0.5.0', '< 1.0')
s.add_runtime_dependency('ruby-progressbar', '~> 1.7')
s.add_runtime_dependency('unicode-display_width', '>= 1.4.0', '< 2.0')

Expand Down
6 changes: 3 additions & 3 deletions spec/rubocop/cli_spec.rb
Expand Up @@ -1634,14 +1634,14 @@ def method(foo, bar, qux, fred, arg5, f) end #{'#' * 85}
it 'fails with an error message' do
create_file('.rubocop.yml', <<~YAML)
AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 4.0
YAML
expect(cli.run([])).to eq(2)
expect($stderr.string.strip).to start_with(
'Error: RuboCop found unknown Ruby version 3.0 in `TargetRubyVersion`'
'Error: RuboCop found unknown Ruby version 4.0 in `TargetRubyVersion`'
)
expect($stderr.string.strip).to match(
/Supported versions: 2.4, 2.5, 2.6, 2.7, 2.8/
/Supported versions: 2.4, 2.5, 2.6, 2.7, 3.0/
)
end
end
Expand Down