fix: integrate .gitignore to refine file processing in generate_over all_structure
.
#16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've implemented a solution where we use the contents of
.gitignore
in our codebase to establish a list of patterns to ignore. This allows us to specifically target and process files within the desired scope, avoiding those that are specified in.gitignore
. This approach should help in efficiently narrowing down the range of filesgenerate_overall_structure
processes, aligning it more closely with our project's relevant files.This change treats
.gitignore
as specifying two types of ignore patterns: one ending with/
as the folder mode, and the other as the file mode. In thecheck_files_and_folders
method, it first matches the folder mode to speed up processing.fix
generate_overall_structure
processed an overly broad range of files. #14 .Results
only those relevant files.
My codebase structure.
![image](https://private-user-images.githubusercontent.com/138990495/291957347-5eb26e06-c9c2-4a28-905f-46217875c600.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzAzNTcsIm5iZiI6MTczOTM3MDA1NywicGF0aCI6Ii8xMzg5OTA0OTUvMjkxOTU3MzQ3LTVlYjI2ZTA2LWM5YzItNGEyOC05MDVmLTQ2MjE3ODc1YzYwMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3J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