Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanLarsson committed Apr 13, 2023
1 parent 7245172 commit dffe5aa
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ INamedTypeSymbol GetTypeSymbol(Type current)
}

#pragma warning disable CA1812, GURA07 // Avoid uninstantiated internal classes
private class Nested
private sealed class Nested
#pragma warning restore CA1812, GURA07 // Avoid uninstantiated internal classes
{
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace Gu.Roslyn.AnalyzerExtensions.Tests.Walkers.ExecutionWalkerTests
namespace Gu.Roslyn.AnalyzerExtensions.Tests.Walkers.ExecutionWalkerTests
{
using System.Collections.Generic;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;

internal class LiteralWalker : ExecutionWalker<LiteralWalker>
internal sealed class LiteralWalker : ExecutionWalker<LiteralWalker>
{
private readonly List<LiteralExpressionSyntax> literals = new();

Expand Down
32 changes: 0 additions & 32 deletions Gu.Roslyn.AnalyzerExtensions/Pooled/PooledSetDebugView.cs

This file was deleted.

15 changes: 14 additions & 1 deletion Gu.Roslyn.AnalyzerExtensions/Pooled/PooledSet{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Gu.Roslyn.AnalyzerExtensions
/// A <see cref="HashSet{T}"/> for re-use.
/// </summary>
/// <typeparam name="T">The type of items in the set.</typeparam>
[DebuggerTypeProxy(typeof(PooledSetDebugView<>))]
[DebuggerTypeProxy(typeof(PooledSet<>.DebugView))]
[DebuggerDisplay("Count = {this.Count}, refCount = {this.refCount}")]
public sealed class PooledSet<T> : IDisposable, IReadOnlyCollection<T>
{
Expand Down Expand Up @@ -158,5 +158,18 @@ private void ThrowIfDisposed()
throw new ObjectDisposedException(typeof(PooledSet<T>).FullName);
}
}

private sealed class DebugView
{
private readonly PooledSet<T> set;

internal DebugView(PooledSet<T> set)
{
this.set = set ?? throw new ArgumentNullException(nameof(set));
}

[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
internal T[] Items => this.set.ToArray();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public static TContaining MoveMember<TContaining>(this TContaining containingTyp
return (TContaining)containingType.WithMembers(containingType.Members.Move(oldIndex, newIndex));
}

private class IndentCommentRewriter : CSharpSyntaxRewriter
private sealed class IndentCommentRewriter : CSharpSyntaxRewriter
{
private readonly string whitespace;
private int n;
Expand Down

0 comments on commit dffe5aa

Please sign in to comment.