Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing [Generator] attribute analyzer and code fix #5235

Closed
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
38aaa2b
Initial implementation
ryzngard Jul 9, 2021
82f5da3
I forgot to type "Attribute"
ryzngard Jul 9, 2021
261db90
Add more tests. Don't report on abstract or anonymous types
ryzngard Jul 12, 2021
d1fbafa
Add description
ryzngard Jul 12, 2021
f8f5015
PR Feedback and Cleanup
ryzngard Jul 12, 2021
8bfe76a
Formatting
ryzngard Jul 12, 2021
e9528d8
Add single quotes around Generator
ryzngard Jul 12, 2021
edeb51e
One more set of quotes...
ryzngard Jul 12, 2021
e9c4432
Update src/Microsoft.CodeAnalysis.Analyzers/Core/MetaAnalyzers/Fixers…
ryzngard Jul 12, 2021
4399ef3
Generate docs
ryzngard Jul 13, 2021
51de378
Merge branch 'features/missing_generator_attribute' of https://github…
ryzngard Jul 13, 2021
e743540
Make separate code action class again
ryzngard Jul 13, 2021
27433df
Apply suggestions from code review
ryzngard Aug 12, 2021
f6defd2
Merge branch 'main' into features/missing_generator_attribute
ryzngard Aug 12, 2021
e2b0caa
Fix headers. Change to CodeAction.Create
ryzngard Aug 12, 2021
d47cb84
WIP
ryzngard Aug 12, 2021
1fc9be2
Merge branch 'main' into features/missing_generator_attribute
ryzngard Sep 3, 2021
2d5e21b
Remove getInnermostNodeForTie
ryzngard Sep 3, 2021
81fad3a
Add CultureInfo.CurrentCulture to string.Format calls
ryzngard Sep 3, 2021
7e93a8d
Merge branch 'main' into features/missing_generator_attribute
ryzngard Sep 27, 2021
e824d24
Merge branch 'main' into features/missing_generator_attribute
ryzngard Sep 29, 2021
96a23be
Fix tests, update to no longer have batch fix now that languagename m…
ryzngard Sep 29, 2021
2f43a82
do nullable right...
ryzngard Sep 29, 2021
8686834
PR feedback
ryzngard Sep 29, 2021
175bba9
More fixes that were wrong changes before. Create localized strings u…
ryzngard Sep 29, 2021
bdf1cf6
Don't pass an IFormatProvider to string.Format
ryzngard Sep 29, 2021
f1e082d
Merge branch 'main' into features/missing_generator_attribute
ryzngard Jan 14, 2022
8e52556
Merge branch 'main' into features/missing_generator_attribute
ryzngard Jan 19, 2022
5604cdc
Merge branch 'features/missing_generator_attribute' of https://github…
ryzngard Jan 19, 2022
7d63d31
Apply suggestions from code review
ryzngard Jan 19, 2022
f9c3aff
PR feedback
ryzngard Jan 19, 2022
8bd19df
Support fix all and add tests
ryzngard Jan 20, 2022
1910bc4
Merge branch 'features/missing_generator_attribute' of https://github…
ryzngard Jan 20, 2022
3a244e8
using static Microsoft.CodeAnalysis.Analyzers.CodeAnalysisDiagnostics…
ryzngard Jan 20, 2022
79d0ef2
Update md
ryzngard Jan 20, 2022
469c749
Run pack
ryzngard Jan 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
Rule ID | Category | Severity | Notes
--------|----------|----------|-------
RS1034 | MicrosoftCodeAnalysisPerformance | Warning | PreferIsKindAnalyzer
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
RS1035 | MicrosoftCodeAnalysisCorrectness | Warning | SourceGeneratorAttributeAnalyzer
Original file line number Diff line number Diff line change
Expand Up @@ -529,4 +529,13 @@
<data name="PreferIsKindFix" xml:space="preserve">
<value>Use 'IsKind' instead of 'Kind'</value>
</data>
<data name="MissingSourceGeneratorAttributeDescription" xml:space="preserve">
<value>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</value>
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
</data>
<data name="MissingSourceGeneratorAttributeMessage" xml:space="preserve">
<value>Missing [Generator] Attribute</value>
</data>
<data name="MissingSourceGeneratorAttributeTitle" xml:space="preserve">
<value>Missing [Generator] Attribute</value>
</data>
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ internal static class DiagnosticIds
public const string DefineDiagnosticMessageCorrectlyRuleId = "RS1032";
public const string DefineDiagnosticDescriptionCorrectlyRuleId = "RS1033";
public const string PreferIsKindRuleId = "RS1034";
public const string MissingSourceGeneratorAttributeId = "RS1035";

// Release tracking analyzer IDs
public const string DeclareDiagnosticIdInAnalyzerReleaseRuleId = "RS2000";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Immutable;
using System.Composition;
using System.Threading;
using System.Threading.Tasks;
using Analyzer.Utilities;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.Editing;

namespace Microsoft.CodeAnalysis.Analyzers.MetaAnalyzers.Fixers
{
[ExportCodeFixProvider(LanguageNames.CSharp, LanguageNames.VisualBasic, Name = nameof(SourceGeneratorAttributeAnalyzerFix))]
[Shared]
public sealed class SourceGeneratorAttributeAnalyzerFix : CodeFixProvider
{
public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
DiagnosticIds.MissingSourceGeneratorAttributeId);

public override async Task RegisterCodeFixesAsync(CodeFixContext context)
{
var document = context.Document;
var root = await document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
var node = root.FindNode(context.Span, getInnermostNodeForTie: true);
ryzngard marked this conversation as resolved.
Show resolved Hide resolved

if (node is null)
{
return;
}

foreach (var diagnostic in context.Diagnostics)
{
context.RegisterCodeFix(new MyCodeAction(
"Fix stuff",
(c) => FixDocumentAsync(document, node, c),
"Fix stuff"), diagnostic);
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
}
}

public override FixAllProvider GetFixAllProvider() => WellKnownFixAllProviders.BatchFixer;

private static async Task<Document> FixDocumentAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
{
var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
var generator = editor.Generator;
var generatorAttribute = generator.Attribute(WellKnownTypeNames.MicrosoftCodeAnalysisGeneratorAttribute);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The parameterless attribute constructor makes the generator C#-only. I'd instead make the codefix add both languages, and let the user delete an extra language if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not actually sure if that's enforced. I didn't find anywhere it was referenced in roslyn. @chsienki might know more.

I don't think we want to add both, I doubt that's correct in most cases. If anything, maybe use the document language

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@Youssef1313 Youssef1313 Jul 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryzngard Using the document language isn't ideal IMO. The source generator may be meant for usage for both languages, while being written in C#. Since the attribute application doesn't explicitly specify a language version, this could be hard to catch for developers.

There are few options I can come up with:

  • Offer 3 codefixes (C# - VB - Both)
  • Heuristic 1:
    • Look at the namespaces referenced in using statements if they are contain C#-specific, VB-specific, or both. In case there are none, I'd fall back to "both" and let the developer adjust the attribute.
  • Heuristic 2:
    • Look at the type name if it contains "CSharp" or "VB" (or "VisualBasic"), and fall back to both languages
  • Heuristic 3:
    • Combines both above.

Simplest is probably the first option to offer 3 codefixes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for now it will be fine to leave it with the default value. Ultimately a C# generator targeting a C# only project is the most likely scenario. We could put the lang parameter in and default it to C# as a hint that you can change it if people feel strongly (or as @ryzngard said, use the document language), but this feels like we're probably just over engineering something that we can address down the line if we get customer feedback about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While true, I think that's overengineering for the problem space right now. We also don't catch cases where the user puts the wrong language with the analyzer... we just don't know. During compilation I'm sure the generator will fail if the attribute is configured incorrectly. Hopefully whatever error happens is enough to help the author figure out next steps. Having the code fix as is does exactly what the analyzer catches, no more and no less. Having some hard to follow heuristics is unwarranted until we have a stronger user opinion on the matter.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the approach from ApplyDiagnosticAnalyzerAttributeFix for consistency.


editor.ReplaceNode(node, generator.AddAttributes(node, generatorAttribute));

return editor.GetChangedDocument();
}

private class MyCodeAction : DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string equivalenceKey) : base(title, createChangedDocument, equivalenceKey)
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
{
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Immutable;
using System.Linq;
using Analyzer.Utilities;
using Analyzer.Utilities.Extensions;
using Microsoft.CodeAnalysis.Diagnostics;

namespace Microsoft.CodeAnalysis.Analyzers.MetaAnalyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)]
public sealed class SourceGeneratorAttributeAnalyzer : DiagnosticAnalyzer
{
private static readonly LocalizableString s_localizableTitle = new LocalizableResourceString(nameof(CodeAnalysisDiagnosticsResources.MissingSourceGeneratorAttributeTitle), CodeAnalysisDiagnosticsResources.ResourceManager, typeof(CodeAnalysisDiagnosticsResources));
private static readonly LocalizableString s_localizableMessage = new LocalizableResourceString(nameof(CodeAnalysisDiagnosticsResources.MissingSourceGeneratorAttributeTitle), CodeAnalysisDiagnosticsResources.ResourceManager, typeof(CodeAnalysisDiagnosticsResources));
private static readonly LocalizableString s_localizableDescription = new LocalizableResourceString(nameof(CodeAnalysisDiagnosticsResources.MissingSourceGeneratorAttributeDescription), CodeAnalysisDiagnosticsResources.ResourceManager, typeof(CodeAnalysisDiagnosticsResources));
ryzngard marked this conversation as resolved.
Show resolved Hide resolved

public static readonly DiagnosticDescriptor DiagnosticRule = new(
DiagnosticIds.MissingSourceGeneratorAttributeId,
s_localizableTitle,
s_localizableMessage,
DiagnosticCategory.MicrosoftCodeAnalysisCorrectness,
DiagnosticSeverity.Warning,
description: s_localizableDescription,
isEnabledByDefault: true);

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticRule);

public override void Initialize(AnalysisContext context)
{
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
context.EnableConcurrentExecution();

context.RegisterCompilationStartAction(compilationContext =>
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
{
var sourceGenerator = compilationContext.Compilation.GetOrCreateTypeByMetadataName(WellKnownTypeNames.MicrosoftCodeAnalysisISourceGenerator);
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
var sourceGeneratorAttribute = compilationContext.Compilation.GetOrCreateTypeByMetadataName(WellKnownTypeNames.MicrosoftCodeAnalysisGeneratorAttribute);
ryzngard marked this conversation as resolved.
Show resolved Hide resolved

if (sourceGenerator == null || sourceGeneratorAttribute == null)
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
// We don't need to check assemblies unless they're referencing Microsoft.CodeAnalysis which defines DiagnosticAnalyzer.
return;

compilationContext.RegisterSymbolAction(c => AnalyzeSymbol(c, sourceGenerator, sourceGeneratorAttribute), SymbolKind.NamedType);
});
}

private static void AnalyzeSymbol(SymbolAnalysisContext c, INamedTypeSymbol sourceGenerator, INamedTypeSymbol sourceGeneratorAttribute)
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
{
var symbol = (INamedTypeSymbol)c.Symbol;

if (symbol.IsAbstract || symbol.IsAnonymousType)
{
return;
}

if (!symbol.AllInterfaces.Any(i => sourceGenerator.Equals(i, SymbolEqualityComparer.Default)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall the name but I think there is an helper function for this that reads better.

ryzngard marked this conversation as resolved.
Show resolved Hide resolved
{
return;
}

if (symbol.GetApplicableAttributes(null).Any(a => a.AttributeClass.Inherits(sourceGeneratorAttribute)))
ryzngard marked this conversation as resolved.
Show resolved Hide resolved
{
return;
}
ryzngard marked this conversation as resolved.
Show resolved Hide resolved

c.ReportDiagnostic(symbol.CreateDiagnostic(DiagnosticRule, symbol.Name));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<target state="translated">Použijte atribut DiagnosticAnalyzer jak pro {0}, tak i pro {1}.</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeDescription">
<source>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</source>
<target state="new">'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeMessage">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeTitle">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSymbolKindArgumentToRegisterActionMessage">
<source>Specify at least one SymbolKind of interest when registering a symbol analyzer action</source>
<target state="translated">Při registraci akce analyzátoru symbolů zadejte minimálně jeden požadovaný SymbolKind.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<target state="translated">Wenden Sie das DiagnosticAnalyzer-Attribut sowohl für "{0}" als auch für "{1}" an.</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeDescription">
<source>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</source>
<target state="new">'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeMessage">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeTitle">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSymbolKindArgumentToRegisterActionMessage">
<source>Specify at least one SymbolKind of interest when registering a symbol analyzer action</source>
<target state="translated">Geben Sie bei der Registrierung einer Symbolanalyseaktion mindestens einen relevanten SymbolKind-Wert an.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<target state="translated">Aplique el atributo DiagnosticAnalyzer para “{0}” y “{1}”.</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeDescription">
<source>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</source>
<target state="new">'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeMessage">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeTitle">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSymbolKindArgumentToRegisterActionMessage">
<source>Specify at least one SymbolKind of interest when registering a symbol analyzer action</source>
<target state="translated">Especifique al menos un elemento SymbolKind de interés al registrar una acción del analizador de símbolos.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<target state="translated">Appliquez l'attribut DiagnosticAnalyzer pour '{0}' et '{1}'.</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeDescription">
<source>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</source>
<target state="new">'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeMessage">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeTitle">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSymbolKindArgumentToRegisterActionMessage">
<source>Specify at least one SymbolKind of interest when registering a symbol analyzer action</source>
<target state="translated">Spécifiez au moins un SymbolKind d'intérêt au moment d'inscrire une action d'analyseur de symbole</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<target state="translated">Applicare l'attributo DiagnosticAnalyzer sia per '{0}' che per '{1}'.</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeDescription">
<source>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</source>
<target state="new">'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeMessage">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeTitle">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSymbolKindArgumentToRegisterActionMessage">
<source>Specify at least one SymbolKind of interest when registering a symbol analyzer action</source>
<target state="translated">Specificare almeno un elemento SymbolKind di interesse durante la registrazione di un'azione dell'analizzatore di simboli</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<target state="translated">'{0}' と '{1}' の両方に DiagnosticAnalyzer 属性を適用します。</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeDescription">
<source>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</source>
<target state="new">'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeMessage">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeTitle">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSymbolKindArgumentToRegisterActionMessage">
<source>Specify at least one SymbolKind of interest when registering a symbol analyzer action</source>
<target state="translated">シンボル アナライザー アクションを登録する際に、関心のある SymbolKind を 1 つ以上指定してください</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<target state="translated">'{0}' 및 '{1}'에 대한 DiagnosticAnalyzer 특성을 적용하세요.</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeDescription">
<source>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</source>
<target state="new">'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeMessage">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeTitle">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSymbolKindArgumentToRegisterActionMessage">
<source>Specify at least one SymbolKind of interest when registering a symbol analyzer action</source>
<target state="translated">기호 분석기 작업을 등록할 때 관심 있는 SymbolKind를 하나 이상 지정하세요.</target>
Expand Down Expand Up @@ -692,4 +707,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<target state="translated">Zastosuj atrybut DiagnosticAnalyzer zarówno do elementu „{0}”, jak i elementu „{1}”.</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeDescription">
<source>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</source>
<target state="new">'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeMessage">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeTitle">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSymbolKindArgumentToRegisterActionMessage">
<source>Specify at least one SymbolKind of interest when registering a symbol analyzer action</source>
<target state="translated">Określ co najmniej jeden interesujący argument SymbolKind podczas rejestrowania akcji analizatora symboli</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<target state="translated">Aplique o atributo DiagnosticAnalyzer para '{0}' e para '{1}'.</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeDescription">
<source>'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</source>
<target state="new">'{0}' inherits from ISourceGenerator but does not have the [Generator] attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeMessage">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSourceGeneratorAttributeTitle">
<source>Missing [Generator] Attribute</source>
<target state="new">Missing [Generator] Attribute</target>
<note />
</trans-unit>
<trans-unit id="MissingSymbolKindArgumentToRegisterActionMessage">
<source>Specify at least one SymbolKind of interest when registering a symbol analyzer action</source>
<target state="translated">Especifique pelo menos um SymbolKind de interesse ao registrar uma ação de analisador de símbolo</target>
Expand Down
Loading