Skip to content

Commit

Permalink
Updated AnalyzeSource build target to exclude *.user
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Jun 4, 2023
1 parent a81935d commit b77e4b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/builder/models/BuildContext.cs
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Bullseye;
using Bullseye.Internal;
Expand Down Expand Up @@ -89,6 +90,11 @@ public void BuildStep(string message)
Console.WriteLine();
}

static readonly List<Regex> skippedFilePatterns = new()
{
new Regex(@"\.user$"),
};

static readonly HashSet<string> skippedFolders = new(StringComparer.InvariantCultureIgnoreCase)
{
".git",
Expand All @@ -110,6 +116,9 @@ public IEnumerable<(string fileName, byte[] content)> FindFilesWithBOMs(string?

foreach (var file in Directory.GetFiles(folder))
{
if (skippedFilePatterns.Any(pattern => pattern.Match(file).Success))
continue;

byte[]? bytes = null;

try
Expand Down

0 comments on commit b77e4b3

Please sign in to comment.