这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@pjcdawkins
Copy link
Contributor

No description provided.

This comment was marked as outdated.

@pjcdawkins pjcdawkins requested a review from Copilot July 1, 2025 18:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for parsing SBT (build.sbt) files for Java projects alongside existing Gradle and Maven support.

  • Introduces parseBuildSBT in java.go and integrates it into the manager initialization.
  • Adds TestSBT in java_test.go with embedded test data and a sample build_.sbt.
  • Updates detection rules in config/package_managers.yml, config/frameworks.yml, and the expression cache to recognize SBT and Play projects.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/dep/java.go Added parseBuildSBT and hooked it into parse().
pkg/dep/java_test.go Embedded SBT test data and added TestSBT.
pkg/dep/testdata/java_sbt/build_.sbt Sample SBT build file for tests.
config/package_managers.yml Added detection rule for SBT manager.
config/frameworks.yml Added Play framework detection via Typesafe Play.
expr.cache Updated cached patterns to include build.sbt.
Comments suppressed due to low confidence (2)

config/frameworks.yml:611

  • [nitpick] The group field here is a list, while in config/package_managers.yml the group for SBT is a string. For consistency and to avoid confusion, consider using the same type (e.g., always a list) across configurations.
      group: [java]

pkg/dep/testdata/java_sbt/build_.sbt:1

  • The test data file is named build_.sbt but the code under test looks for build.sbt. Consider renaming the file to build.sbt to align with the expected filename and reduce confusion.
name := "play-sbt-example"

@pjcdawkins pjcdawkins merged commit cc3d391 into main Jul 3, 2025
2 checks passed
@pjcdawkins pjcdawkins deleted the support-sbt branch July 3, 2025 19:27
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.

2 participants