Compare 7ac4df9 ... +0 ... afaa1af


@@ -1,13 +1,11 @@
Loading
1 1
using System;
2 -
using System.Collections.Generic;
3 2
using System.Linq;
4 -
using System.Text;
5 3
6 4
namespace TurnerSoftware.RobotsExclusionTools.Helpers
7 5
{
8 -
	public class PathComparisonUtility
6 +
	public static class PathComparisonUtility
9 7
	{
10 -
		public bool IsAllowed(SiteAccessEntry accessEntry, Uri requestUri)
8 +
		public static bool IsAllowed(SiteAccessEntry accessEntry, Uri requestUri)
11 9
		{
12 10
			var requestPath = requestUri.PathAndQuery;
13 11
@@ -38,14 +36,14 @@
Loading
38 36
			return true;
39 37
		}
40 38
41 -
		public bool PathMatch(string sourceRecord, string uriPath, StringComparison comparison)
39 +
		public static bool PathMatch(string sourceRecord, string uriPath, StringComparison comparison)
42 40
		{
43 41
			var sourcePieces = sourceRecord.Split(new[] { '*' }, StringSplitOptions.RemoveEmptyEntries).ToArray();
44 42
			var lastPiece = sourcePieces.LastOrDefault();
45 43
			var mustMatchToEnd = false;
46 44
			var mustMatchToStart = true;
47 45
48 -
			if (lastPiece.EndsWith("$"))
46 +
			if (lastPiece != null && lastPiece.EndsWith("$"))
49 47
			{
50 48
				//Remove the last dollar sign from the last piece
51 49
				lastPiece = lastPiece.Substring(0, lastPiece.Length - 1);

@@ -53,8 +53,7 @@
Loading
53 53
			}
54 54
55 55
			var entry = GetEntryForUserAgent(userAgent);
56 -
			var pathComparisonUtility = new PathComparisonUtility();
57 -
			return pathComparisonUtility.IsAllowed(entry, uri);
56 +
			return PathComparisonUtility.IsAllowed(entry, uri);
58 57
		}
59 58
60 59
		public SiteAccessEntry GetEntryForUserAgent(string userAgent)

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src/TurnerSoftware.RobotsExclusionTools -0.01% 96.06%
Project Totals (22 files) 96.06%
Loading