Rasagar/Library/PackageCache/com.unity.package-validation-suite/Editor/ValidationSuite/ValidationTests/RestrictedFilesValidation.cs
2024-08-26 23:07:20 +03:00

33 lines
1.3 KiB
C#

using System.Collections.Generic;
using UnityEditor.PackageManager.ValidationSuite.ValidationTests.Standards;
namespace UnityEditor.PackageManager.ValidationSuite.ValidationTests
{
internal class RestrictedFilesValidation : BaseValidation
{
/*
* Ideally this string should be inlined in the UnapprovedFileTypesUS0115.internalExceptionFileList list, but
* this string is restricted by the internal validation suite and the exception is set for the current file specifically.
*/
internal const string LldExecutable = "lld.exe";
UnapprovedFileTypesUS0115 unapprovedFileTypesUs0115 = new UnapprovedFileTypesUS0115();
internal override List<IStandardChecker> ImplementedStandardsList => new List<IStandardChecker>() { unapprovedFileTypesUs0115 };
public RestrictedFilesValidation()
{
TestName = "Restricted File Type Validation";
TestDescription = "Make sure no restricted file types are included with this package.";
TestCategory = TestCategory.ContentScan;
}
protected override void Run()
{
// Start by declaring victory
TestState = TestState.Succeeded;
unapprovedFileTypesUs0115.Check(Context.PublishPackageInfo.path, Context.ValidationType);
}
}
}