Requirements: if-then for source matcher
Aperta
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.