-
Notifications
You must be signed in to change notification settings - Fork 575
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
Feature/rooignore implementation #1014
base: main
Are you sure you want to change the base?
Feature/rooignore implementation #1014
Conversation
|
Could |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! A few questions:
- How related are the code actions changes to this? Could they be moved to their own PR?
- Could we name the file RooIgnoreController?
- Should we also look for .clineignore to make it easier for people who use both tools?
Oops. Was tired :) Reclinecontroller...I'll get that changed and add .clineignore added. |
I will also look at how much work it is to add to list files. |
Description
This PR supersedes #1013 with an improved implementation of the rooignore feature, including fixes for CodeActionProvider test mocks.
The ReclineIgnoreController implements file-based ignore patterns similar to .gitignore, allowing users to specify files and patterns in a .rooignore file that should be excluded from Roo-Code operations.
Key features:
Watches for changes to .rooignore file and updates rules automatically
Uses the 'ignore' package for gitignore-style pattern matching
Provides methods to validate file access and filter file paths
Handles relative and absolute paths correctly
Includes comprehensive test coverage
Fixes CodeActionProvider test mocks to properly handle QuickFix actions
Type of change
[x] New feature
How Has This Been Tested?
The implementation includes a comprehensive test suite that verifies:
Loading and applying .rooignore patterns correctly
Filtering file paths based on ignore rules
Handling cases where .rooignore doesn't exist
Pattern matching for both specific files and wildcards
Proper behavior with relative and absolute paths
All tests are implemented in ReclineIgnoreController.test.ts using Jest with mocked filesystem operations.
Checklist
[x] My code follows the patterns of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
Additional context
This PR includes fixes for the test failures that were present in the original PR #1013, specifically addressing the QuickFix handling in CodeActionProvider tests.
Reviewers
@RooVetGit/maintainers
Important
Implements
.rooignore
file handling withReclineIgnoreController
, updates extension activation, and modifies file operations to respect ignore rules, with comprehensive tests.ReclineIgnoreController
inReclineIgnoreController.ts
to handle.rooignore
file patterns, using theignore
package for pattern matching..rooignore
for changes and updates rules automatically.validateAccess()
andfilterPaths()
methods to manage file access based on ignore rules.extension.ts
to initializeReclineIgnoreController
during activation and export it viagetIgnoreController()
.extractTextFromFile()
inextract-text.ts
andopenFile()
inopen-file.ts
to respect.rooignore
rules.ReclineIgnoreController.test.ts
with tests for loading and applying ignore patterns, handling non-existent.rooignore
, and path filtering.CodeActionProvider
test mocks inCodeActionProvider.test.ts
to handleQuickFix
actions properly.This description was created by
for 264aad8. It will automatically update as commits are pushed.