You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#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]
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text.RegularExpressions;
|
|
using System.Threading.Tasks;
|
|
using Tools.DotNETCommon.Perforce;
|
|
|
|
namespace MetadataTool
|
|
{
|
|
class ContentPatternMatcher : GenericContentPatternMatcher
|
|
{
|
|
public override string Category => "Content";
|
|
|
|
public override bool TryMatch(InputJob Job, InputJobStep JobStep, InputDiagnostic Diagnostic, List<BuildHealthIssue> Issues)
|
|
{
|
|
HashSet<string> FileNames = new HashSet<string>();
|
|
foreach(Match Match in Regex.Matches(Diagnostic.Message, @"^\s*Log[a-zA-Z0-9]+:\s+(?:Error:|Warning:)\s+((?:[a-zA-Z]:)?[^:]+(?:.uasset|.umap)):\s*(.*)"))
|
|
{
|
|
FileNames.Add(GetNormalizedFileName(Match.Groups[1].Value, JobStep.BaseDirectory));
|
|
}
|
|
|
|
if(FileNames.Count > 0)
|
|
{
|
|
BuildHealthIssue Issue = new BuildHealthIssue(Job.Project, Category, Job.Url, new BuildHealthDiagnostic(JobStep.Name, JobStep.Url, Diagnostic.Message, Diagnostic.Url));
|
|
Issue.FileNames.UnionWith(FileNames);
|
|
Issues.Add(Issue);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public override string GetSummary(BuildHealthIssue Issue)
|
|
{
|
|
if (Issue.FileNames.Count == 0)
|
|
{
|
|
return "Content errors";
|
|
}
|
|
else
|
|
{
|
|
return String.Format("Content errors in {0}", String.Join(", ", GetFileNamesWithoutPath(Issue.FileNames)));
|
|
}
|
|
}
|
|
}
|
|
}
|