Convert the three stdlib-violating local hooks to language: python

Aperta
#580 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, yaml

Direzione di ricerca

Start by reading ADR-0005 alongside .pre-commit-config.yaml and .github/pre-commit-ci.yaml to see the three hook blocks and the placement-table exception row. The imports to declare live in eval/corpus/validate.py and scripts/test_pre_commit_cache.py / scripts/test_select_comparison_base.py. Sequence this after the cache-bootstrap retirement, since test-pre-commit-cache may vanish; done means the hooks run under language: python with pinned additional_dependencies, a guard test catches language: system hooks importing third-party modules, and a negative fixture fails on bad input with a fresh PRE_COMMIT_HOME.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

blocked infra risk/low

Context

ADR-0005 places eval-corpus-schema, test-pre-commit-cache, and test-select-comparison-base in CI for one cause: each imports a module outside the standard library without declaring it.

  • eval/corpus/validate.py imports yaml and jsonschema.
  • scripts/test_pre_commit_cache.py imports yaml.
  • scripts/test_select_comparison_base.py imports yaml.

The follow-up is to declare the dependencies and return the hooks to the gate.

Done when

  1. Each hook uses language: python with pinned additional_dependencies: pyyaml and jsonschema as needed.
  2. Each hook returns to .pre-commit-config.yaml and leaves .github/pre-commit-ci.yaml.
  3. The ADR-0005 placement table exception row for these three hooks is removed by amendment.
  4. A guard test fails when a language: system hook imports a non-standard-library module.
  5. A negative fixture proves that each hook fails on bad input.
  6. The gate passes with a fresh PRE_COMMIT_HOME when VCS access is denied.

Sequencing

Land after the cache bootstrap retirement. test-pre-commit-cache tests code that the retirement deletes, so it may disappear from the set.

Merge-conflict hygiene

Touch only the three hook blocks. Do not reformat the file.

Related

  • ADR-0005 follow-up "Convert the three language: system hooks"
  • Cache retirement issue created with this set

(AI generated)

Lingua principale
Go
Stelle
7
Fork
9
Merge medio
22h 37m
PR unite (30g)
118

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di redhat-et/ProtoBot

Tutte le issue di redhat-et/ProtoBot

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.