Skip to content

Commit

Permalink
Support Prism as a Ruby parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Mar 21, 2024
1 parent 6c8deaf commit 5313b0d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,17 @@ jobs:
ruby-version: "3.3"
bundler-cache: true
- run: NO_COVERAGE=true bundle exec rake spec

prism:
runs-on: ubuntu-latest
name: Prism
steps:
- uses: actions/checkout@v4
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
# Specify the minimum Ruby version 2.7 required for Prism to run.
ruby-version: 2.7
bundler-cache: true
- name: spec
run: NO_COVERAGE=true bundle exec rake prism_spec
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Edge (Unreleased)

- Fix a false negative for `Capybara/NegationMatcher` when using `to_not`. ([@ydah])
- Support Prism as a Ruby parser (experimental). ([@ydah])

## 2.20.0 (2024-01-03)

Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gemspec

gem 'bump'
gem 'danger'
gem 'prism'
gem 'rack'
gem 'rake'
gem 'rspec', '~> 3.11'
Expand Down
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ task confirm_documentation: :generate_cops_documentation do
end
end

desc 'Run RSpec with Prism'
task :prism_spec do
sh('PARSER_ENGINE=parser_prism bundle exec rake spec')
end

task default: %i[build_config spec
internal_investigation
confirm_config
Expand Down
1 change: 1 addition & 0 deletions rubocop-capybara.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ Gem::Specification.new do |spec|
}

spec.add_runtime_dependency 'rubocop', '~> 1.41'
spec.add_runtime_dependency 'rubocop-ast', '>= 1.31.1', '< 2.0'
end

0 comments on commit 5313b0d

Please sign in to comment.