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

Include StringIO in Rubocop linter #190

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Include StringIO in Rubocop linter #190

merged 1 commit into from
Nov 11, 2024

Conversation

rbclark
Copy link
Contributor

@rbclark rbclark commented Nov 11, 2024

I am running into the following issue when running ruby 3.3.5 with slim lint:

# SLIM_LINT_RUBOCOP_CONF=.slim-lint-rubocop.yml ./bin/bundle exec slim-lint app/views
uninitialized constant SlimLint::Linter::RuboCop::StringIO
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/linter/rubocop.rb:84:in `with_ruby_from_stdin'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/linter/rubocop.rb:37:in `find_lints'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/linter/rubocop.rb:21:in `block in <class:RuboCop>'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/sexp_visitor.rb:12:in `trigger_pattern_callbacks'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/linter.rb:33:in `run'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/runner.rb:64:in `block in collect_lints'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/runner.rb:63:in `map'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/runner.rb:63:in `collect_lints'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/runner.rb:23:in `block in run'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/runner.rb:22:in `map'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/runner.rb:22:in `run'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/cli.rb:91:in `scan_for_lints'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/cli.rb:60:in `act_on_options'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/lib/slim_lint/cli.rb:32:in `run'
/Users/rbclark/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/slim_lint-0.31.0/bin/slim-lint:7:in `<top (required)>'

This seems to be happening specifically due to my psych version updating from 5.1.2 -> 5.2.0.

Explicitly requiring stringio has fixed the error for me.

@sds sds enabled auto-merge (squash) November 11, 2024 22:22
@sds sds added the bug label Nov 11, 2024
@sds sds merged commit 5f1de2e into sds:main Nov 11, 2024
4 checks passed
@sds
Copy link
Owner

sds commented Nov 11, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants