Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

style: chdir before running rubocop #17595

Merged
merged 1 commit into from
Jun 30, 2024
Merged

style: chdir before running rubocop #17595

merged 1 commit into from
Jun 30, 2024

Conversation

Bo98
Copy link
Member

@Bo98 Bo98 commented Jun 30, 2024

This fixes longstanding issues when the working directory is incorrect, including incorrect globbing of include/excludes and spurious warnings such as:

Tip: Based on detected gems, the following RuboCop extension libraries might be helpful:
  * rubocop-minitest (https://rubygems.org/gems/rubocop-minitest)

You can opt out of this message by adding the following to your config (see https://docs.rubocop.org/rubocop/extensions.html#extension-suggestions for more options):
  AllCops:
    SuggestExtensions: false

@Bo98 Bo98 force-pushed the rubocop-chdir branch 4 times, most recently from 548fc16 to 26e52b2 Compare June 30, 2024 00:48
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves the issue for me, thank you!

Copy link
Contributor

@apainintheneck apainintheneck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen the old .rbi file problems and RuboCop extension warnings recently but it still makes sense to keep this consistent regardless of the working directory.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks @Bo98!

@MikeMcQuaid MikeMcQuaid enabled auto-merge June 30, 2024 18:18
@MikeMcQuaid MikeMcQuaid merged commit 3df562a into master Jun 30, 2024
25 checks passed
@MikeMcQuaid MikeMcQuaid deleted the rubocop-chdir branch June 30, 2024 18:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants