Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jun 21, 2023
1 parent 11e792e commit c9c5509
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ApprovalTests/Maintenance/ApprovalMaintenance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static bool IsAbandoned(FileInfo approvedFile, Assembly assembly)
var nestedMethodName = parts[2];
var nestedTypes = rootTypes
.Where(t => t.Name == className)
.SelectMany(x => x.GetNestedTypes())
.SelectMany(_ => _.GetNestedTypes())
.Where(t => t.Name == nestedClassName);
methods = nestedTypes.SelectMany(t => t.GetMethods())
.Where(m => m.Name == nestedMethodName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class StackTraceParser : IStackTraceParser
static IList<IStackTraceParser> parsers = (IList<IStackTraceParser>) GetParsers();
IStackTraceParser parser;

public string ForTestingFramework => GetParsers().Select(x => x.ForTestingFramework).ToReadableString();
public string ForTestingFramework => GetParsers().Select(_ => _.ForTestingFramework).ToReadableString();

public bool Parse(StackTrace stackTrace)
{
Expand Down
4 changes: 2 additions & 2 deletions src/ApprovalTests/Reporters/FirstWorkingReporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class FirstWorkingReporter : IEnvironmentAwareReporter, IApprovalReporter

public void Report(string approved, string received)
{
var r = Reporters.FirstOrDefault(x => x.IsWorkingInThisEnvironment(received));
var r = Reporters.FirstOrDefault(_ => _.IsWorkingInThisEnvironment(received));
if (r == null)
{
throw new($"{GetType().Name} Could not find a Reporter for file {received}");
Expand All @@ -28,7 +28,7 @@ public void Report(string approved, string received)

public virtual bool IsWorkingInThisEnvironment(string forFile)
{
return Reporters.Any(x => x.IsWorkingInThisEnvironment(forFile));
return Reporters.Any(_ => _.IsWorkingInThisEnvironment(forFile));
}

public void CleanUp(string approved, string received)
Expand Down
4 changes: 2 additions & 2 deletions src/ApprovalTests/Scrubber/PdfScrubber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public static IEnumerable<Replacement> FindReplacements(FileStream fileStream)

// De-dupe because some matches might occur in both the left and right sides of the buffer
return replacements
.GroupBy(x => x.start)
.Select(x => x.First());
.GroupBy(_ => _.start)
.Select(_ => _.First());
}

static IEnumerable<Replacement> GetDateReplacements(string input, long positionOffset)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class TargetPocoBase
[Fact]
public void GetControlNonPublicStaticFields() =>
Approvals.VerifyAll(
new TargetPoco().NonPublicStaticFields(false).OrderBy(x => x.Name),
new TargetPoco().NonPublicStaticFields(false).OrderBy(_ => _.Name),
string.Empty);

[Fact]
Expand Down

0 comments on commit c9c5509

Please sign in to comment.