Skip to content

Add --no_merge option for source scanner#187

Open
JustinWonjaePark wants to merge 2 commits into
mainfrom
feat/no_merge
Open

Add --no_merge option for source scanner#187
JustinWonjaePark wants to merge 2 commits into
mainfrom
feat/no_merge

Conversation

@JustinWonjaePark

@JustinWonjaePark JustinWonjaePark commented Jul 3, 2026

Copy link
Copy Markdown
Contributor
  • New Features
    • Added --no_merge command-line and settings option to FOSSLight Scanner to prevent folder-level merging during source code analysis.
    • The option is passed to FOSSLight Source Scanner (as merge_by_folder) and to the container-based scan flow.
    • Added a description of the --no_merge option in the help message.
  • Tests
    • Updated test cases in test_cli.py and test__parse_setting.py to match the updated return signature of parsing functions.

Summary by CodeRabbit

  • New Features
    • Added a new --no_merge option to keep source scan results file-based (no merge by folder).
    • The same setting is now supported via saved scan settings.
  • Bug Fixes
    • Invalid no_merge values are now safely normalized to a default behavior.
  • Tests
    • Updated CLI and settings parsing tests and fixtures to cover no_merge.
  • Chores
    • Updated the scanner dependency to a newer compatible version.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d5d35b6b-c0be-4e35-af8a-6de14662f990

📥 Commits

Reviewing files that changed from the base of the PR and between a47689b and 4e43a9e.

📒 Files selected for processing (1)
  • tests/fixtures/setting.json

📝 Walkthrough

Walkthrough

This PR adds a new no_merge boolean option for source analysis, wires it through setting parsing and CLI handling, and uses it to control scanner merge behavior. It also bumps the fosslight_source dependency version.

Changes

no_merge option support

Layer / File(s) Summary
Setting parsing for no_merge
src/fosslight_scanner/_parse_setting.py, tests/test__parse_setting.py
parse_setting_json reads a new no_merge boolean, validates/coerces it, and includes it in the returned tuple; test expectations updated.
CLI argument wiring for no_merge
src/fosslight_scanner/cli.py, src/fosslight_scanner/_help.py, tests/test_cli.py
set_args() accepts, resolves precedence for, and returns no_merge; main() adds a --no_merge flag, forwards it to run_main(), and help text/tests are updated.
Scanner execution using no_merge
src/fosslight_scanner/fosslight_scanner.py
run_scanner and run_main accept no_merge, controlling merge_by_folder in the API path and appending --no_merge to the Docker command when set.
Dependency version bump
pyproject.toml
fosslight_source requirement bumped from >=2.2.16,<3.0.0 to >=2.3.3,<3.0.0.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • fosslight/fosslight_scanner#184: Also modifies the shared setting/CLI plumbing in _parse_setting.py and cli.py, with overlapping tuple and option wiring.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a new --no_merge option to the source scanner.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/no_merge

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JustinWonjaePark
JustinWonjaePark force-pushed the feat/no_merge branch 2 times, most recently from 55bdcf6 to d04ba59 Compare July 3, 2026 02:33
Signed-off-by: Park Wonjae <wonjae.park@lge.com>
@JustinWonjaePark JustinWonjaePark self-assigned this Jul 3, 2026
@JustinWonjaePark JustinWonjaePark added the enhancement [PR/Issue] New feature or request label Jul 3, 2026
@JustinWonjaePark
JustinWonjaePark requested review from dd-jy and soimkim July 3, 2026 03:48
@JustinWonjaePark
JustinWonjaePark marked this pull request as ready for review July 3, 2026 03:48
Signed-off-by: Park Wonjae <wonjae.park@lge.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement [PR/Issue] New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant