protoc-gen-validate
protoc-gen-validate copied to clipboard
go: check for NaN in lt, lte, gt, gte
Closes #548
Don't know if this is supposed to have tests or not. Not really familiar with Bazel, so would need some pointers as to where to proceed on that.
@rodaine would it be possible to get some eyes on this?
I believe the CI failures are not related. If so, I think this is something that fixes a bug quite a few people would stumble upon (I've done so, at least)
Ping @Reflejo
Ping @rmichela
:pray:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is not stale, please remove the tag.
Rebased.
@htuch is it possible to get some eyes on this?
I'm not an active maintainer, I think @rmichela @lizan @snowp might be better folks to take a look. FWIW it seems totally reasonable to me, but we would definitely want to see tests for this behavior added.
Thanks for replying @htuch. How would I get started on tests? Do you for example do a golden file setup where the result from the templates are compared against a known good result?
Yes, there are places for declaring test cases, e.g. for string const constraint:
- https://github.com/envoyproxy/protoc-gen-validate/blob/main/tests/harness/cases/strings.proto#L8
- https://github.com/envoyproxy/protoc-gen-validate/blob/dc51e59d2e463996ef24e45621cf61f95fa64b0f/tests/harness/executor/cases.go#L739
You should be able to fit this into the relevant float tests in these directories.
relates to #85
Excited to see new maintainers here @ElliotMJackson. I rebased this on newest main branch, and added what I think are tests? Can't get them to run locally, let's see what happens on CI.
We are excited to be here @torkelrogstad! I've kicked off CI 🤞 If you could help make our CLAassistant happy next time you're online that would be great.
For future reference, run them locally with a make ci
or a safer space is in the container:
docker build -t protoc-gen-validate .
docker run --rm protoc-gen-validate ci
Found some issues here I'm working on fixing, pushing up later
closing due to inactivity