Flag autogenerated files in build process#2078
Open
uttam282005 wants to merge 3 commits intoaboutcode-org:mainfrom
Open
Flag autogenerated files in build process#2078uttam282005 wants to merge 3 commits intoaboutcode-org:mainfrom
uttam282005 wants to merge 3 commits intoaboutcode-org:mainfrom
Conversation
Signed-off-by: uttam282005 <[email protected]>
Signed-off-by: uttam282005 <[email protected]>
Signed-off-by: uttam282005 <[email protected]>
Contributor
Author
|
Hi @chinyeungli, this PR is ready for review. I’d appreciate your feedback when you have time. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issues
Changes
This pull request introduces logic to automatically detect and flag autogenerated files in the codebase, improving the accuracy of resource classification. It adds a mechanism to scan file headers for common autogenerated markers, reclassifies such files from "requires review" to "ignored not interesting," and includes robust utilities for reading file headers safely. Comprehensive tests are added to ensure the new functionality works as intended.
Autogenerated file detection and classification:
is_probably_autogenerated_resourceinscanpipe/pipes/d2d.pyto identify files as autogenerated based on header markers, and updatedmatch_unmapped_resourcesto reclassify such files fromREQUIRES_REVIEWtoIGNORED_NOT_INTERESTING.AUTOGENERATED_FILE_MARKERSand implementedread_file_head_textutility inscanpipe/pipes/flag.pyto reliably read and normalize the file header for marker matching.Testing:
is_probably_autogenerated_resourcecovering positive and negative cases, and for the reclassification logic inmatch_unmapped_resources.read_file_head_textto ensure correct behavior with normal, non-UTF-8, missing, and null-byte-containing files.Checklist