Add type package validation - #890
Open
Mingzhe Jiang (jiangmingzhe) wants to merge 7 commits into
Open
Conversation
| /// validation is now implemented (see <c>BCPVT030</c>–<c>BCPVT033</c>); this code is retained for | ||
| /// API stability but is no longer emitted. | ||
| /// </summary> | ||
| public const string ArchiveValidationNotImplemented = "BCPVT001"; |
There was a problem hiding this comment.
The codes seem to be duplicated in this file. Can we make it so they are only in one place (just like in Bicep)?
| } | ||
|
|
||
| // 2. Package-relative path. | ||
| var cmp = string.CompareOrdinal(x.Path ?? string.Empty, y.Path ?? string.Empty); |
There was a problem hiding this comment.
According to https://learn.microsoft.com/en-us/dotnet/api/system.string.compareordinal?view=net-10.0, the string.CompareOrdinal() method accepts nulls already.
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.
Adds a new library for validating serialized Bicep type packages before publishing or consumption.
Functionality
index.json, archive files, and archive streams.Structure
Packaging/: input and archive handlingStructural/: JSON shape validationGraph/: reference and target validationSemantic/: value constraintsPolicy/: compatibility rulesHygiene/: unreachable/unexpected filesDiagnostics/: diagnostic models and orderingAlso adds the projects to the solution and introduces a suite of unit-test and golden-sample samples.