Skip to content

Handle encoding difference between scanner all and dependency runs#315

Merged
dd-jy merged 1 commit into
mainfrom
e_test
Jun 11, 2026
Merged

Handle encoding difference between scanner all and dependency runs#315
dd-jy merged 1 commit into
mainfrom
e_test

Conversation

@woocheol-lge

@woocheol-lge woocheol-lge commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Handle encoding difference between scanner all and dependency runs

Summary by CodeRabbit

  • Bug Fixes
    • Improved UTF-8 encoding handling by ensuring proper initialization during dependency scanning execution.

…pendency runs

Signed-off-by: woocheol <jayden6659@gmail.com>
@woocheol-lge woocheol-lge self-assigned this Jun 9, 2026
@woocheol-lge woocheol-lge added the bug fix [PR] Fix the bug label Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 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: 6831a04d-8ad0-4206-a381-4886cf948044

📥 Commits

Reviewing files that changed from the base of the PR and between dbfcbb5 and a9854df.

📒 Files selected for processing (2)
  • src/fosslight_dependency/cli.py
  • src/fosslight_dependency/run_dependency_scanner.py
💤 Files with no reviewable changes (1)
  • src/fosslight_dependency/cli.py

📝 Walkthrough

Walkthrough

This PR relocates UTF-8 environment variable setup from the CLI entry point to the scanner function itself. The environment variables PYTHONUTF8 and PYTHONIOENCODING are removed from main() in cli.py and added at the start of run_dependency_scanner() in run_dependency_scanner.py.

Changes

UTF-8 Environment Variable Setup Relocation

Layer / File(s) Summary
Move UTF-8 environment variable setup from CLI to scanner function
src/fosslight_dependency/cli.py, src/fosslight_dependency/run_dependency_scanner.py
Environment variable assignments for PYTHONUTF8 and PYTHONIOENCODING are removed from the main() function and relocated to the beginning of run_dependency_scanner(), ensuring UTF-8 encoding configuration occurs at the scanner's entry point rather than at the CLI layer.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • fosslight/fosslight_dependency_scanner#309: Both PRs change how PYTHONUTF8/PYTHONIOENCODING are set around startup—main PR removes those assignments from cli.py and moves them into run_dependency_scanner.py, while PR #309 adjusts the same env handling in cli.py/main().
  • fosslight/fosslight_dependency_scanner#305: Both PRs change how PYTHONUTF8/PYTHONIOENCODING are set for UTF-8 handling in fosslight_dependency/cli.py (one removes setting in main() while the other sets them at module import time).

Suggested reviewers

  • bjk7119
  • dd-jy
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly relates to the main change: moving UTF-8 encoding environment variable setup from cli.py to run_dependency_scanner.py to handle encoding differences between scanner modes.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch e_test

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 and usage tips.

@woocheol-lge woocheol-lge requested review from bjk7119 and dd-jy June 9, 2026 08:32
@dd-jy dd-jy merged commit 6278468 into main Jun 11, 2026
14 checks passed
@dd-jy dd-jy deleted the e_test branch June 11, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix [PR] Fix the bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants