bazel-lib icon indicating copy to clipboard operation
bazel-lib copied to clipboard

[FR] Simple validation of stamp substitutions in expand_template

Open njlr opened this issue 1 year ago • 0 comments

It would be useful to be able to provide simple validations of values given to expand_template to ensure that incorrect information has not been given to Bazel. If the values do not pass validation, the build should fail.

This is particularly important when implementing "deliverables", since an incorrect stamp might lead to artifacts going to the wrong place.

A validation regex seems like a good balance of simplicity / expressiveness.

For example, a sem-ver regex: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string

njlr avatar Oct 01 '24 12:10 njlr