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

Improve Efficiency and Clarity in fileSearch.ts #131

Open
Mefisto04 opened this issue Oct 16, 2024 · 2 comments
Open

Improve Efficiency and Clarity in fileSearch.ts #131

Mefisto04 opened this issue Oct 16, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Mefisto04
Copy link
Contributor

The fileSearch.ts file can be optimized for better performance and readability:

  1. searchFiles Function:

    • Improve error handling with more detailed messages.
    • Run getIgnorePatterns and getIgnoreFilePatterns in parallel using Promise.all.
  2. getIgnorePatterns Function:

    • Use a Set to avoid duplicate entries.
    • Simplify the addition of default, output, and custom patterns.
  3. parseIgnoreContent Function:

    • Check for empty content before processing.
    • Use reduce for cleaner code.
  4. getIgnoreFilePatterns Function:

    • Refactor conditional logic to support future extensions easily.

These changes will enhance the code's efficiency and maintainability.
Please assign me this issue so that i can start work on it.

@Mefisto04
Copy link
Contributor Author

hey @yamadashy, please check it once

@yamadashy
Copy link
Owner

@Mefisto04
This looks great! I appreciate your detailed analysis and suggestions for improving fileSearch.ts. These should indeed enhance both the efficiency and readability of our code.
I'll assign this task to you right away.

Thank you for taking the initiative on this. Looking forward to seeing the improved fileSearch.ts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants