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

An error occurred while Lint/RequireRelativeSelfPath cop was inspecting ... #10151

Closed
emmahsax opened this issue Oct 1, 2021 · 3 comments
Closed

Comments

@emmahsax
Copy link

emmahsax commented Oct 1, 2021

I'm receiving this issue running Rubocop on GitHub Actions:

1 error occurred:
An error occurred while Lint/RequireRelativeSelfPath cop was inspecting /home/runner/work/project_name/pproject_name/lib/file_name.rb:10:2.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop/rubocop/issues

Mention the following information in the issue report:
1.22.0 (using Parser 3.0.2.0, rubocop-ast 1.12.0, running on ruby 3.0.2 x86_64-linux)

Expected behavior

We don't see this error, and Rubocop completes and returns a 0 as the exit code.

Actual behavior

The error appears, and Rubocop returns an exit code of 1.

Steps to reproduce the problem

Probably just need to run Rubocop on GitHub Actions with the versions mentioned in the blurb above.

RuboCop version

See above.

@dvandersluis
Copy link
Member

dvandersluis commented Oct 1, 2021

Could you share your code from /home/runner/work/project_name/pproject_name/lib/file_name.rb line 10?

There's a good chance that your issue is already fixed by #10143!

@emmahsax
Copy link
Author

emmahsax commented Oct 1, 2021

Yes, I think that PR/Issue would resolve this. Do we know when a new tag will be released?

# frozen_string_literal: true

require 'yaml'
require 'json'
require 'highline_wrapper'

files = "#{File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), 'git_helper'))}/**/*.rb"

Dir[files].each do |file|
  require_relative file
end

module GitHelper; end

@dvandersluis
Copy link
Member

dvandersluis commented Oct 1, 2021

#10143 will fix your issue. Often new releases come out every 3 weeks or so but we don't have a set schedule. You could always add # rubocop:disable Lint/RequireRelativeSelfPath to that line in the meantime.

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

No branches or pull requests

2 participants