feat(filetree): Add exclude option to ignore paths in tree output#13
feat(filetree): Add exclude option to ignore paths in tree output#13ioncakephper merged 1 commit intomainfrom
Conversation
Summary of ChangesHello @ioncakephper, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the file tree generation functionality by adding a new configuration option to exclude specific paths. This feature provides greater control over the output, allowing users to filter out irrelevant or temporary directories, thereby improving the clarity and utility of the generated file trees. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new exclude option to the fileTreeExtended transform, allowing specific paths to be ignored from the file tree output. The implementation involves filtering the path list after it's generated. The documentation and configuration files have been updated to reflect this new feature. My feedback focuses on a redundancy in the new configuration which could be simplified for better clarity and efficiency.
| style: 'for-the-badge', | ||
| }, | ||
| fileTreeExtended: { | ||
| exclude: ['node_modules', '.git', '.vscode', '.DS_Store'], |
There was a problem hiding this comment.
The paths listed in this exclude array (node_modules, .git, .vscode, .DS_Store) are already covered by the default ignore option in the transform. While this is not harmful, it is redundant. The ignore option is also more efficient for large directories as it prevents fast-glob from traversing them in the first place. To avoid this redundancy and potential confusion, consider removing this line and relying on the default ignore behavior.
| style: 'for-the-badge', | ||
| }, | ||
| fileTreeExtended: { | ||
| exclude: ['node_modules', '.git', '.vscode', '.DS_Store'], |
There was a problem hiding this comment.
This example demonstrates using exclude for paths that are already ignored by default via the ignore option. This is redundant and might be confusing for users trying to understand the difference between exclude and ignore. A better example would showcase excluding files not covered by the default ignores, such as ['package.json', 'package-lock.json'], which is used elsewhere in this README. This would more clearly illustrate the intended use case for the new exclude option.
No description provided.