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

Ouverte
#292 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@FredApps y travaille déjà.

Depuis le 17/11/2026.

  • #293 par @FredApps — ouverte

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
30/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
go, python, typescript
Domaine
cli, testing

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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".

Langage dominant
TypeScript
Étoiles
0
Forks
4
Merge moyen
18 h 41 min
PR mergées (30 j)
48

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de DiffCI/core

Toutes les issues de DiffCI/core

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.