Skip to content

feat: add IsUvProject for uv project detection#167

Open
mcombuechen wants to merge 2 commits into
refactor/os-flows-logic-migrationfrom
feat/uv-detection-helper
Open

feat: add IsUvProject for uv project detection#167
mcombuechen wants to merge 2 commits into
refactor/os-flows-logic-migrationfrom
feat/uv-detection-helper

Conversation

@mcombuechen

Copy link
Copy Markdown
Contributor

What this does

Exposes the uv lofile detection and FF check, so we can consume this in cli-extension-os-flows and don't have to leave the low-level, uv-specific code there. Addendum to #165.

@mcombuechen
mcombuechen requested review from a team as code owners May 8, 2026 12:01
@github-actions github-actions Bot added the feat label May 8, 2026
@snyk-io

snyk-io Bot commented May 8, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Logging Regression 🟠 [major]

The IsUvProject function hardcodes a nil logger when calling HasLockFile. In the previous implementation within callback.go (see old hunk), HasLockFile was passed a valid *zerolog.Logger. This change silences diagnostic logs during the project detection phase, which are critical for debugging why a project might be skipped (e.g., permission issues or path mismatches). Furthermore, if HasLockFile is not defensive against nil loggers, this will cause a panic at runtime.

if !HasLockFile(dir, targetFile, allProjects, nil) {
Brittle Test Constant 🟡 [minor]

The test defines a local constant featureFlagUvCLI with a hardcoded string value instead of importing and using workflow.FeatureFlagUvCLI from internal/workflow. Since detection.go relies on the internal/workflow constant, any future change to that constant's value would result in tests passing while the production code fails to detect the flag correctly.

const featureFlagUvCLI = "internal_snyk_cli_uv_enabled"
📚 Repository Context Analyzed

This review considered 7 relevant code sections from 7 files (average relevance: 0.91)

@mcombuechen
mcombuechen force-pushed the refactor/os-flows-logic-migration branch from e533fdd to a04b75b Compare May 8, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant