File tree Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 75
75
ruby-version : " 3.3"
76
76
bundler-cache : true
77
77
- run : NO_COVERAGE=true bundle exec rake ${{ matrix.task }}
78
+
79
+ prism :
80
+ runs-on : ubuntu-latest
81
+ name : Prism
82
+ steps :
83
+ - uses : actions/checkout@v4
84
+ - name : Use prism parser
85
+ run : |
86
+ cat << EOF > Gemfile.local
87
+ gem 'prism'
88
+ EOF
89
+ - name : set up Ruby
90
+ uses : ruby/setup-ruby@v1
91
+ with :
92
+ # Specify the minimum Ruby version 2.7 required for Prism to run.
93
+ ruby-version : 2.7
94
+ bundler-cache : true
95
+ - name : spec
96
+ env :
97
+ PARSER_ENGINE : parser_prism
98
+ run : NO_COVERAGE=true bundle exec rake
Original file line number Diff line number Diff line change 201
201
end
202
202
203
203
%w[ && || ] . each do |operator |
204
- context "with #{ operator } " do
204
+ # FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0.
205
+ # It has been resolved in the development line.
206
+ # This will be resolved in Prism > 0.24.0 and higher releases.
207
+ context "with #{ operator } " , broken_on : :prism do
205
208
it 'does not flag the call' do
206
209
expect_no_offenses ( <<~RUBY )
207
210
can_create_user? #{ operator } create(:user)
210
213
end
211
214
end
212
215
213
- context 'with ternary operator' do
216
+ # FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0.
217
+ # It has been resolved in the development line.
218
+ # This will be resolved in Prism > 0.24.0 and higher releases.
219
+ context 'with ternary operator' , broken_on : :prism do
214
220
it 'does not flag the call' do
215
221
expect_no_offenses ( <<~RUBY )
216
222
can_create_user? ? create(:user) : nil
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ module SpecHelper
32
32
# Run focused tests with `fdescribe`, `fit`, `:focus` etc.
33
33
config . filter_run_when_matching :focus
34
34
35
+ if ENV [ 'PARSER_ENGINE' ] == 'parser_prism'
36
+ config . filter_run_excluding broken_on : :prism
37
+ end
38
+
35
39
# We should address configuration warnings when we upgrade
36
40
config . raise_errors_for_deprecations!
37
41
You can’t perform that action at this time.
0 commit comments