Skip to content

feat(version-scanner): support target list inputs via --targets#17478

Open
chalmerlowe wants to merge 7 commits into
mainfrom
feat/version-scanner-targets
Open

feat(version-scanner): support target list inputs via --targets#17478
chalmerlowe wants to merge 7 commits into
mainfrom
feat/version-scanner-targets

Conversation

@chalmerlowe

@chalmerlowe chalmerlowe commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This pull request adds support for scanning multiple target dependencies and versions concurrently via a YAML file containing targets, while consolidating file handling and error logging.

Key changes:

  • YAML Targets File Support: Adds a --targets-file CLI argument to read and resolve multiple target dependency-version tuples from a configuration file.
  • Consolidated File Handling: Centralizes file reading and error logging across the codebase under a single helper (_safe_read_file) with uniform stderr printing and exit codes.
  • Expanded Test Coverage: Adds parametrized unit tests validating targets file parsing errors (missing files, bad format, null values) and the core file helper error branches, and updates integration tests to utilize soft-fail flags.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for scanning multiple dependency targets simultaneously via a new --targets CLI argument, which accepts either a YAML/JSON file path or an inline string. It updates the scanning, rule resolution, and CSV reporting logic to handle multiple targets, and adds comprehensive unit tests. The review feedback highlights two critical issues where calling os.path.exists() on inline JSON/YAML strings containing invalid path characters can cause the script to crash on Windows. Additionally, the reviewer recommends improving error handling for non-existent target files and validating parsed version types to prevent unexpected scanning behavior.

Comment thread scripts/version_scanner/version_scanner.py Outdated
Comment thread scripts/version_scanner/version_scanner.py Outdated
@chalmerlowe chalmerlowe force-pushed the feat/version-scanner-targets branch from 92f86a0 to 3c0b8fe Compare June 17, 2026 09:25
@chalmerlowe chalmerlowe marked this pull request as ready for review June 17, 2026 10:10
@chalmerlowe chalmerlowe requested a review from a team as a code owner June 17, 2026 10:10
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.

1 participant