Gu.Analyzers icon indicating copy to clipboard operation
Gu.Analyzers copied to clipboard

Results 31 Gu.Analyzers issues
Sort by recently updated
recently updated
newest added

Bumps [Microsoft.CodeAnalysis.CSharp.Workspaces](https://github.com/dotnet/roslyn) from 4.1.0 to 4.4.0. Release notes Sourced from Microsoft.CodeAnalysis.CSharp.Workspaces's releases. .NET 7.0 Preview 5 Release .NET 7.0 Preview 2 Release .NET 7.0 Preview 1 Release .NET 6.0.1 Release...

dependencies

Before: ```cs /// /// Create a from . /// /// The type of the items in the collection. /// The source collection. /// True means that the is not disposed...

Before: ```cs internal static bool FindSingle(IFieldSymbol field, SemanticModel semanticModel, CancellationToken cancellationToken, [NotNullWhen(true)] out ExpressionSyntax? expression) { expression = null; if (field.IsReadOnly && field.TrySingleDeclaration(cancellationToken, out VariableDeclarationSyntax? declaration) && declaration.Variables.TrySingle(out var variable))...

```cs public static class PooledDictionary { /// /// Borrow a dictionary, dispose returns it. /// /// The type of keys. /// The type of values. /// A . public static...

Default disabled or maybe info, just for a quick way to find all uses.

Nicer if they are in same order as testrunner.

analyzer
codefix

```cs if (candidate.ArgumentList is { Arguments: { Count: 1 } arguments } && arguments[0] is { Expression: { } expression }) ``` Check that indexing is in bounds.

```cs private static bool IsReferenceTypeCreation(ObjectCreationExpressionSyntax objectCreation, SyntaxNodeAnalysisContext context) { if (objectCreation == null) { return false; } var type = context.SemanticModel.GetTypeInfoSafe(objectCreation, context.CancellationToken) .Type; if (type.IsValueType) { return false; } return...

analyzer
codefix

```cs /// /// Same as DocumentEditor.ReplaceNode but nicer types. /// /// The type of the node. /// The . /// The . /// The replacement factory. /// The that was...

bug

```cs IParameterSymbol lastParameter = null; ```