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

Respect RuboCop file exclusion #173

Merged
merged 1 commit into from
Jun 28, 2022
Merged

Conversation

vinistock
Copy link
Member

Motivation

Closes #170

RuboCop doesn't respect the exclusion configuration if an excluded path is passed explicitly as an argument (which is what we do in diagnostics and formatting).

Implementation

Pass the --force-exclusion flag to RuboCop, which makes it respect ignored paths even if requested explicitly.

Manual Tests

  1. Start the LSP on this branch
  2. Open an included file, such as diagnostics.rb
  3. Make some edits
  4. Verify diagnostics and auto-formatting work
  5. Open an excluded file, such as any Ruby file under test/fixtures
  6. Make some edits
  7. Verify neither diagnostics or formatting are available

@vinistock vinistock requested a review from a team June 28, 2022 18:59
@vinistock vinistock self-assigned this Jun 28, 2022
Copy link
Member

@paracycle paracycle left a comment

Choose a reason for hiding this comment

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

Nice catch!

@vinistock vinistock merged commit aefdd53 into main Jun 28, 2022
@vinistock vinistock deleted the vs/respect_rubocop_file_exclusion branch June 28, 2022 19:19
@shopify-shipit shopify-shipit bot temporarily deployed to production July 7, 2022 19:06 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to 0-2-stable July 27, 2022 13:55 Inactive
andyw8 pushed a commit to andyw8/ruby-lsp that referenced this pull request Mar 2, 2024
…ypes/node-18.6.3

Bump @types/node from 18.0.3 to 18.6.3
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 this pull request may close these issues.

VSCode extension does not respect Rubocop ignored files
3 participants