Files
UnrealEngineUWP/Engine/Source/Programs/UnrealGameSync/MetadataTool/BuildHealth/Matchers/GenericContentPatternMatcher.cs
Ryan Durand 74c879d5f3 Updating copyrights for Engine Programs.
#rnx
#rb none
#jira none

#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869242 in //Fortnite/Release-12.00/... via CL 10869536
#ROBOMERGE-BOT: FORTNITE (Main -> Dev-EngineMerge) (v613-10869866)

[CL 10870960 by Ryan Durand in Main branch]
2019-12-26 23:06:02 -05:00

42 lines
1.3 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tools.DotNETCommon.Perforce;
namespace MetadataTool
{
/// <summary>
/// Base class for pattern matchers that match errors in source code
/// </summary>
abstract class GenericContentPatternMatcher : PatternMatcher
{
/// <summary>
/// Set of extensions to treat as code
/// </summary>
static readonly string[] ContentExtensions =
{
".uasset",
".umap",
".ini",
};
/// <summary>
/// Finds any suspected causers for a particular failure. Excludes any changes that don't contain code.
/// </summary>
/// <param name="Perforce">The perforce connection</param>
/// <param name="Issue">The build issue</param>
/// <param name="Changes">List of changes since the issue first occurred.</param>
/// <returns>List of changes which are causers for the issue</returns>
public override List<ChangeInfo> FindCausers(PerforceConnection Perforce, BuildHealthIssue Issue, IReadOnlyList<ChangeInfo> Changes)
{
List<ChangeInfo> Causers = base.FindCausers(Perforce, Issue, Changes);
Causers.RemoveAll(x => !ContainsAnyFileWithExtension(Perforce, x, ContentExtensions));
return Causers;
}
}
}