Skip to content

Update --ignore plugin and improve multi-input performance#5055

Open
AyanSinhaMahapatra wants to merge 7 commits into
aboutcode-org:developfrom
AyanSinhaMahapatra:fix-ignore-pre-scan-plugin
Open

Update --ignore plugin and improve multi-input performance#5055
AyanSinhaMahapatra wants to merge 7 commits into
aboutcode-org:developfrom
AyanSinhaMahapatra:fix-ignore-pre-scan-plugin

Conversation

@AyanSinhaMahapatra

@AyanSinhaMahapatra AyanSinhaMahapatra commented May 22, 2026

Copy link
Copy Markdown
Member

Fixes: #4065

References:

This likely fixes all the above issues.

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

@AyanSinhaMahapatra AyanSinhaMahapatra force-pushed the fix-ignore-pre-scan-plugin branch 4 times, most recently from 3598e51 to 913bc2f Compare May 26, 2026 14:23
Comment thread .github/workflows/commoncode-release.yml Dismissed
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>
@AyanSinhaMahapatra AyanSinhaMahapatra changed the title Merge back commoncode with git history intact Update --ignore plugin and improve multi-input performance Jun 5, 2026
For 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>
@AyanSinhaMahapatra AyanSinhaMahapatra force-pushed the fix-ignore-pre-scan-plugin branch from 30ddcbe to 14f5067 Compare June 9, 2026 12:57
JonoYang
JonoYang previously approved these changes Jun 9, 2026

@JonoYang JonoYang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AyanSinhaMahapatra lgtm! i left a comment

Comment thread src/scancode/cli.py

def run_scan(
input, # NOQA
input, #

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is # NOQA supposed to be here?

@JonoYang JonoYang self-requested a review June 9, 2026 22:57
@JonoYang JonoYang dismissed their stale review June 9, 2026 22:58

commoncode test failure

@JonoYang JonoYang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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>
@AyanSinhaMahapatra AyanSinhaMahapatra force-pushed the fix-ignore-pre-scan-plugin branch from 4c0df3f to 72a4f87 Compare June 11, 2026 11:52
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
@AyanSinhaMahapatra

Copy link
Copy Markdown
Member Author

See #4065 (comment) for details on performance benefits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fast-scan: Apply performance improvements to code: batch 3 (codebase collection and multiple inputs)

3 participants