Update --ignore plugin and improve multi-input performance#5055
Open
AyanSinhaMahapatra wants to merge 7 commits into
Open
Update --ignore plugin and improve multi-input performance#5055AyanSinhaMahapatra wants to merge 7 commits into
AyanSinhaMahapatra wants to merge 7 commits into
Conversation
3598e51 to
913bc2f
Compare
Deprecate --ingore and --include pre-scan plugins and move the ignore/include functionality to codebase import stage to get rid of multiple codebase walks. Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
7 tasks
commoncode with git history intactFor multiple inputs, do not walk outside the input paths, from their common prefix. Instead create only the directory relationships between the common prefix and input paths and start the codebase walk from every input paths. Also deprecate --include options to only support ignoring paths through path patterns. Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
30ddcbe to
14f5067
Compare
JonoYang
previously approved these changes
Jun 9, 2026
JonoYang
left a comment
Member
There was a problem hiding this comment.
@AyanSinhaMahapatra lgtm! i left a comment
|
|
||
| def run_scan( | ||
| input, # NOQA | ||
| input, # |
JonoYang
requested changes
Jun 9, 2026
JonoYang
left a comment
Member
There was a problem hiding this comment.
@AyanSinhaMahapatra looks like we are failing some tests in the CI .
One of the failures is the helptext test, where it needs to be regenerated to add the new plugin entry
The other one is an unexpected keyword argument:
FAILED tests/scancode/test_cli.py::test_scan_supports_multiple_input_paths - TypeError: FileDrivenTesting.get_test_loc() got an unexpected keyword argument 'relative'
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
4c0df3f to
72a4f87
Compare
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
72a4f87 to
bb148ea
Compare
Member
Author
|
See #4065 (comment) for details on performance benefits. |
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.
Fixes: #4065
References:
--ignoredoes not appear to work for directories #4212This likely fixes all the above issues.
Tasks
Run tests locally to check for errors.