Validation issue filtering options #310
Merged
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.
When validating a tileset with many contents, then the glTF-Validator will be applied to each content. Depending on the nature of the glTF files, this may cause a lot of noise. For example, when the glTF files contain certain extensions that are not handled by the glTF validator, then this will usually cause ...
for each and every content.
The
ValidationResult.filter
function (as described in the README) already offers some options for filtering validation results post-hoc. However, there is currently no way to define fine-grained filtering options directly at the command line. Such filters might be arbitrarily complex, and therefore, there will hardly be a way to squeeze these into configuration- or option files (except for some simple, special cases) - and even less, define them at the command line.However, there are some ways of how one could reduce the amount of noise here, with relatively little effort.
This PR currently implements an additional
ValidationOption
property caledcontentValidationIssueSeverity
. This defines a filter criterion for theCONTENT_VALIDATION_[INFO/WARNING/ERROR]
family of issues that is applied during the validation itself. This validation option can (like all validation options) be part of an "options file" that is passed in at the command line.For example, with
npx ts-node ./src/main.ts --tilesetFile "C:\Data\tileset.json" --optionsFile gltfSilencingOptions.json
and a file
gltfSilencingOptions.json
that just containsthe validator will no longer include content validation INFO- or WARNING issues in the result.
One could consider more fine-grained control here. For example, users might wish to filter out certain issues from the glTF-Validator in particular, based on the
type
that the issues have there. For example, they might want to filter out onlyBUFFER_VIEW_INVALID_BYTE_STRIDE
issues or so. This is currently not possible (and would require a few structural changes), because these types are not preserved: The 3D Tiles validator defines its own set of "issue types", and does not pass through these types (so they are all converted intoCONTENT_VALIDATION_[INFO/WARNING/ERROR]
issues internally)Note: This PR does two things to reduce the noise that are unrelated to the content validation issue filtering:
NGA_gpm
,MAXAR_extent
, andMAXAR_grid
3D Tiles extensions, meaning that the presence of these extensions will no longer cause any issues to be reported