hypothesis / hypothesis/cookiecutters

Add validation of command line and `cookiecutter.json` options

Open
#142 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Cookiecutter supports a `pre_gen_project.py` hook that can be used to validate template options: https://cookiecutter.readthedocs.io/en/stable/advanced/hooks.html#example-validating-template-variables We should consider using this to validate our options: crashing if any unknown options are given or if a known option is given an invalid value.

If we're lucky this will also validate the contents of projects `cookiecutter.json` files when you run `make template`.

This would help to avoid issues like https://github.com/hypothesis/cookiecutters/pull/129

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.