CLI: a Go or Python project with a tooling-only package.json gets no full test command

Đang mở
#292 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@FredApps đang làm issue này rồi.

Từ ngày 17/11/2026.

  • #293 của @FredApps — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go, python, typescript
Lĩnh vực
cli, testing

Hướng nghiên cứu

Start with inferFullCommand in packages/diffci-cli/src/client/full-command.ts and trace how it handles a root package.json without a test script before checking Go and Python project files. Reproduce with the Python or Go setup in the issue and run diffci verify --changed. Done when a tooling-only package.json no longer blocks full command inference, while the two stated package.json cases retain their behavior; pull request #293 is already open.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

inferFullCommand (packages/diffci-cli/src/client/full-command.ts) returns { reason: "package.json has no test script" } as soon as it finds a root package.json without a test script. It never reaches the go.mod and Python checks below it. Many Go and Python repositories keep a package.json only for tooling (prettier, husky, commitlint). For them the full command is never inferred, though the engine selects their tests as Go or Python tests.

Repro: a Python project: pyproject.toml, app.py, tests/test_app.py (pytest), and a package.json with only {"private": true, "devDependencies": {"prettier": "3.0.0"}}. Commit it, edit pyproject.toml (a configuration change, which needs the full suite), and run diffci verify --changed. The Go equivalent is go.mod plus the same package.json.

Expected: the full command is python3 -m pytest (or go test ./...), as without the package.json.

Actual: verify is BLOCKED with "package.json has no test script". inferFullCommand returns that reason for the repository directly.

A package.json that does have a test script still wins, and a package.json with no test script and no other project still reports "package.json has no test script".

Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
18 giờ 41 phút
Pull request đã merge (30 ngày)
48

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DiffCI/core

Tất cả issue của DiffCI/core

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.