Add support for simple Gradle version catalog aliases

未关闭
#4 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
62/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
java, python

调研方向

Start in backend/app/scanners/analyzers/java.py to see how literal group:artifact:version Gradle declarations are extracted, then check the fixtures in backend/tests/scanners/test_java_analyzer.py. The change should read gradle/libs.versions.toml as data, resolve simple [libraries] aliases for implementation, api and test configurations, and leave anything unsupported unresolved. Done means the new fixture tests pass alongside the existing literal-parsing tests, and docs/languages.md describes the added support and its limits.

由索引模型根据 Issue 内容生成。

描述

enhancement good first issue

Summary

Gradle analysis currently extracts literal group:artifact:version declarations. Simple Gradle version catalog aliases in gradle/libs.versions.toml are not resolved, so dependencies referenced as implementation(libs.alias) or equivalent are missing from the inventory.

Affected files

  • backend/app/scanners/analyzers/java.py
  • backend/tests/scanners/test_java_analyzer.py
  • docs/languages.md

Scope

Read the conventional gradle/libs.versions.toml catalog and resolve simple library aliases used by supported dependency configurations. Parse the TOML as data only; never execute Gradle scripts or fetch artifacts. Leave unsupported expressions unresolved.

Acceptance criteria

  • The scanner reads gradle/libs.versions.toml when present.
  • Simple [libraries] aliases resolve from inline versions and version.ref entries.
  • Basic implementation(libs.alias), api(libs.alias), and test-configuration references are recognized.
  • Existing literal Gradle dependency parsing remains unchanged.
  • Complex expressions, unsupported catalog features, and unresolved version references remain unresolved rather than guessed.
  • Fixture-based tests cover inline versions, version.ref, supported configurations, unresolved expressions, and literal parsing.
  • docs/languages.md accurately documents the added catalog support and remaining limitations.

Testing expectations

Run the focused Java analyzer tests and relevant backend scanner tests. Confirm documentation claims match tested behavior.

主要语言
Python
星标
2
派生
1
平均合并
1 小时 22 分钟
30 天内合并 PR
2

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ayushdoesdev/verspect 的其他 Issue

查看 ayushdoesdev/verspect 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。