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

Exclude .git/ by default #5542

Merged
merged 1 commit into from
Feb 3, 2018
Merged

Exclude .git/ by default #5542

merged 1 commit into from
Feb 3, 2018

Conversation

pocke
Copy link
Collaborator

@pocke pocke commented Feb 3, 2018

Problem

When many non-Ruby files exist, RuboCop is slow. Because RuboCop checks that all files match glob or not.

And git subtree makes too many files under .git/subtree-cache directory. So, if user uses it, RuboCop will be too slow unfortunately.

Note: I knew the problem from this blog post.
http://blog.yujigraffiti.com/2018/02/rubocop.html (written in Japanese)
I have not confirmed the problem in my environment as I don't use git subtree, but I think this change is reasonable even without the performance issue.

Solution

Exclude .git/ directory by default.


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Run rake default or rake parallel. It executes all tests and RuboCop for itself, and generates the documentation.

Problem
===

When many non-Ruby files exist, RuboCop is slow. Because RuboCop checks that all files match glob or not.

And `git subtree` makes too many files under `.git/subtree-cache` directory. So, if user uses it, RuboCop will be too slow unfortunately.

Note: I knew the problem from this blog post.
http://blog.yujigraffiti.com/2018/02/rubocop.html (written in Japanese)
I have not confirmed the problem in my environment as I don't use `git subtree`, but I think this change is reasonable even without the performance issue.

Solution
===

Exclude `.git/` directory by default.
@bbatsov bbatsov merged commit 7e906de into rubocop:master Feb 3, 2018
@bbatsov
Copy link
Collaborator

bbatsov commented Feb 3, 2018

Makes sense to me. Perhaps it'd be nice if we did for other VCSes, but these days it seems pretty much everyone's on git anyways.

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.

2 participants