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

Support RuboCop v1.65.1 #371

Closed
tmimura39 opened this issue Sep 2, 2024 · 2 comments · Fixed by #374
Closed

Support RuboCop v1.65.1 #371

tmimura39 opened this issue Sep 2, 2024 · 2 comments · Fixed by #374

Comments

@tmimura39
Copy link

I get the following error when running erblint with RuboCop v1.65.1

`require': cannot load such file -- rexml/document (LoadError)

This may be due to the removal of rexml from RuboCop's dependencies.
rubocop/rubocop#13165

The following options are available to address this case.

  • Add rexml to erblint's dependency
  • Modify to not use rexml as well as RuboCop

how do you like it?

@etiennebarrie
Copy link
Member

We need rexml (at least optionally) for the JUnit reporter.

So minimally we could add rexml to the gemspec.

But a better solution IMO would be to use a call to gem like Rails does for database adapters.

And then making sure we don't load the JUnit reporter unless requested by the configuration.

That way, a project using JUnit would get a proper exception when trying to use it without rexml available either bundled in Ruby or in their application bundle, but projects not using that reporter would not need rexml in their bundle.

@yxhuvud
Copy link

yxhuvud commented Sep 13, 2024

Would anyone be opposed to adding rexml to the gemspec as a quickfix to get everything clean and green on update everywhere and then do the refactor whenever someone feels like doing it? I guess it lessens the chance that it actually get improved but then extra dependencies that isn't needed is the kind of thing that people may fix just for the hell of it.

Earlopain added a commit to Earlopain/erb_lint that referenced this issue Sep 17, 2024
Closes Shopify#371
Follows rubocop/rubocop#13165

This leaves the output mostly the same, except that text is no longer wrapped in CDATA.
Some things possibly need to be escaped now, and CDATA has different escaping needs.
So, just use the same escaping everywhere
Earlopain added a commit to Earlopain/erb_lint that referenced this issue Sep 18, 2024
Closes Shopify#371
Follows rubocop/rubocop#13165

This leaves the output mostly the same, except that text is no longer wrapped in CDATA.
Some things possibly need to be escaped now, and CDATA has different escaping needs.
So, just use the same escaping everywhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants