google / google/codeworld

Requirements: if-then for source matcher

Aperta
#791 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Haskell
Stelle
1.3k
Fork
201
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The only requirements-checker rule that currently uses the source matcher is `containsMatch`. This rule requires that some declaration in the file matches the target. Another useful pattern could be to require that any declaration that matches the first pattern must *also* match the second. For example, one could write:

ifMatch:
condition: |
foo = $any
template: |
foo = $var $(tupleOf [| $any |])

This would say that if `foo` is defined, then its definition must look like a function applied to a tuple.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.