Repository navigation
Evaluate headers only after status and content type, match patterns as ECMA-262 (dpp-criteria 4fcfe5c) - #4
Merged
Conversation
…s ECMA-262 (dpp-criteria 4fcfe5c)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adapts resolve checks to dpp-criteria 4fcfe5c (PR #4), sections "Order of evaluation within a request" and "Regular expressions" in CRITERIA-FORMAT.md.
Changes
further_requests,statusandcontent_typeare evaluated first. Header assertions are evaluated only if both hold; otherwise they give no message of their own. The JSON object check that dpplint applies tocontent_type: application/jsoncounts as part of the content type.applies_ifis unchanged.matchesin header assertions: ECMA-262 without flags, searched anywhere in the value, case-sensitive.^and$anchor the whole value, also if it contains a line break.EcmaRegexpparses the pattern as ECMA-262 and translates it into an equivalent Ruby Regexp. It includes the Annex B rules that apply without flags:\Ais the letter A, a lone{is a literal.^/$(line anchors in Ruby),.and line terminators,\s,\b,[a&&b],[[a],a{,2},a{2}?.\k, lone surrogates).., character classes and quantifiers applied to such a character.jsonandbody_equals_step. A criterion that uses them is still skipped. No resolve criterion in dpp-criteria uses them at present.Tests
./build.sh(dpp-criteria 4fcfe5c).^and$on values with a line break;new RegExp(p).test(v)) for 55 patterns × 52 values. The only difference is the BMP deviation above.Reference passport
https://dpp.oydapp.eu/01/09520123456788/21/000001:*/*passes.Results are from automated checks only and establish no presumption of conformity.
Open questions for dpp-criteria
matchesandsearch()inapplies_if? The format covers only assertions andbase_matches; RFC 9535 uses I-Regexp (RFC 9485).content_type: application/jsonalso require a single JSON object, and does that count as part of the content type for the order of evaluation?skippedfor patterns that are invalid or outside the portable subset at run time?.and character classes, or define matching on code points?