Skip to content

Commit d768025

Browse files
smaye81timostamm
andauthored
Upgrade validation logic (#202)
This includes upgrades to validation logic for: - URIs, URI references - IP addresses and prefixes (v4 and v6) - Hostname, Port - Email Address The validation here adheres to the defined RFC standards for each entity and passes conformance for all new conformance tests defined in: - bufbuild/protovalidate#320 - bufbuild/protovalidate#341 --------- Co-authored-by: Timo Stamm <[email protected]>
1 parent 114039e commit d768025

23 files changed

+19469
-2659
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ COPYRIGHT_YEARS := 2023-2024
1111
LICENSE_IGNORE := -e internal/testdata/
1212
# Set to use a different compiler. For example, `GO=go1.18rc1 make test`.
1313
GO ?= go
14-
ARGS ?= --strict --strict_message --strict_error
14+
ARGS ?= --strict_message --strict_error
1515
GOLANGCI_LINT_VERSION ?= v1.64.8
1616
# Set to use a different version of protovalidate-conformance.
1717
# Should be kept in sync with the version referenced in proto/buf.lock and
1818
# 'buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go' in go.mod.
19-
CONFORMANCE_VERSION ?= v0.10.0
19+
CONFORMANCE_VERSION ?= v0.10.4
2020

2121
.PHONY: help
2222
help: ## Describe useful make targets
@@ -47,7 +47,7 @@ lint-proto: $(BIN)/buf
4747

4848
.PHONY: conformance
4949
conformance: $(BIN)/protovalidate-conformance protovalidate-conformance-go ## Run conformance tests
50-
$(BIN)/protovalidate-conformance $(ARGS) $(BIN)/protovalidate-conformance-go
50+
$(BIN)/protovalidate-conformance $(ARGS) $(BIN)/protovalidate-conformance-go --expected_failures=conformance/expected_failures.yaml
5151

5252
.PHONY: generate
5353
generate: generate-proto generate-license ## Regenerate code and license headers

buf.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
version: v2
33
deps:
44
- name: buf.build/bufbuild/protovalidate
5-
commit: 63bb56e204954558946a641ef0d68910
6-
digest: b5:ec5661b2855484eca2043fe61d27eb22673ab926ccd0e849531752eb17b08402fae1382705cee7f7b42d4d9ec56aff72bba7ec6835902cf6f86323c9ac682d16
5+
commit: 0409229c37804d6187ee0806eb4eebce
6+
digest: b5:795db9d3a6e066dc61d99ac651fa7f136171869abe2211ca272dd84aada7bc4583b9508249fa5b61300a5b1fe8b6dbf6edbc088aa0345d1ccb9fff705e3d48e9
77
- name: buf.build/bufbuild/protovalidate-testing
8-
commit: 6106553151724c9480917a13c2fc2d57
9-
digest: b5:6a7a3700d0396fad82118850c2d94263b80ab2d1462220fab1227ef29bd320d85327748fa583a461e6d0084233a3ea8d5c372e85d12f7d64de075420051f9955
8+
commit: 5acbe1f3c8f24ced9466b9ccccad4cb0
9+
digest: b5:5e9d54d19ce3d9d368f4b1b5ee4f20094d1c33d0f2dca19536339335c2e70d5ffedbd4fa28e290b59ecae0671c9d2dc20b6b8ebba5a9ac76cbf5f9d2af655ef4
1010
- name: buf.build/envoyproxy/protoc-gen-validate
1111
commit: daf171c6cdb54629b5f51e345a79e4dd
1212
digest: b5:c745e1521879f43740230b1df673d0729f55704efefdcfc489d4a0a2d40c92a26cacfeab62813403040a8b180142d53b398c7ca784a065e43823605ee49681de

0 commit comments

Comments
 (0)