Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions org.mixedrealitytoolkit.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Changed

* Updated code style in `HandsSubsystemDescriptor`, `MRTKSubsystemDescriptor`, `DictationSubsystemDescriptor`, and `XRSubsystemHelpers`. [PR #1109](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1109)
* Updated `PackageValidator` to only be valid if `UNITY_EDITOR` is true. [PR #1125](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1125)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) Mixed Reality Toolkit Contributors
// Licensed under the BSD 3-Clause

// Disable "missing XML comment" warning for tests. While nice to have, this documentation is not required.
#pragma warning disable CS1591
#if HAS_ASSET_STORE_VALIDATION
#if HAS_ASSET_STORE_VALIDATION && UNITY_EDITOR

using System;
using System.Collections.Generic;
Expand All @@ -26,12 +24,7 @@ public static class PackageValidator
/// </exception>
public static PackageValidatorResults Validate(string packageName)
{
PackageInfo info = UpmPackageInfo(packageName);
if (info == null)
{
throw new ArgumentException($"No package found with name \"{packageName}\"");
}

PackageInfo info = UpmPackageInfo(packageName) ?? throw new ArgumentException($"No package found with name \"{packageName}\"");
string packageId = $"{info.name}@{info.version}";
ValidationSuite.ValidatePackage(packageId, ValidationType.AssetStore);

Expand Down Expand Up @@ -70,5 +63,5 @@ private static PackageInfo[] UpmListOffline(string packageIdOrName = null)
}
}
}
#endif // HAS_ASSET_STORE_VALIDATION
#pragma warning restore CS1591

#endif // HAS_ASSET_STORE_VALIDATION && UNITY_EDITOR