提交 9aa26974 编写于 作者: C Cyrus Najmabadi

Add feature to remove confusing use of suppression operator

上级 558d04b3
......@@ -133,6 +133,9 @@ internal static class IDEDiagnosticIds
public const string InvalidSuppressMessageAttributeDiagnosticId = "IDE0076";
public const string LegacyFormatSuppressMessageAttributeDiagnosticId = "IDE0077";
public const string RemoveUnnecessarySuppressionForIsExpressionDiagnosticId = "IDE0080";
// Analyzer error Ids
public const string AnalyzerChangedId = "IDE1001";
public const string AnalyzerDependencyConflictId = "IDE1002";
......
......@@ -621,4 +621,19 @@
<value>Apply preferred 'using' placement preferences</value>
<comment>'using' is a C# keyword and should not be localized</comment>
</data>
<data name="Remove_unnecessary_suppression_operator" xml:space="preserve">
<value>Remove unnecessary suppression operator</value>
</data>
<data name="Suppression_operator_has_no_effect_and_can_be_misinterpreted" xml:space="preserve">
<value>Suppression operator has no effect and can be misinterpreted</value>
</data>
<data name="Negate_expression_changes_semantics" xml:space="preserve">
<value>Negate expression (changes semantics)</value>
</data>
<data name="Remove_operator_preserves_semantics" xml:space="preserve">
<value>Remove operator (preserves semantics)</value>
</data>
<data name="Remove_suppression_operators" xml:space="preserve">
<value>Remove suppression operators</value>
</data>
</root>
\ No newline at end of file
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#nullable enable
using System;
using System.Collections.Immutable;
using System.Composition;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Editing;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.CSharp.RemoveUnnecessarySuppression
{
[ExportCodeFixProvider(LanguageNames.CSharp), Shared]
internal class CSharpRemoveUnnecessarySuppressionCodeFixProvider : CodeFixProvider
{
private const string RemoveOperator = nameof(RemoveOperator);
private const string NegateExpression = nameof(NegateExpression);
public override ImmutableArray<string> FixableDiagnosticIds
=> ImmutableArray.Create(IDEDiagnosticIds.RemoveUnnecessarySuppressionForIsExpressionDiagnosticId);
public override FixAllProvider GetFixAllProvider()
=> new CSharpRemoveUnnecessarySuppressionFixAllProvider(this);
private class CSharpRemoveUnnecessarySuppressionFixAllProvider : DocumentBasedFixAllProvider
{
private readonly CSharpRemoveUnnecessarySuppressionCodeFixProvider _provider;
public CSharpRemoveUnnecessarySuppressionFixAllProvider(CSharpRemoveUnnecessarySuppressionCodeFixProvider provider)
{
_provider = provider;
}
protected override string CodeActionTitle
=> CSharpFeaturesResources.Remove_suppression_operators;
protected override async Task<SyntaxNode?> FixAllInDocumentAsync(FixAllContext fixAllContext, Document document, ImmutableArray<Diagnostic> diagnostics)
{
var cancellationToken = fixAllContext.CancellationToken;
var newDoc = await FixAllAsync(
document, diagnostics,
fixAllContext.CodeActionEquivalenceKey == NegateExpression,
cancellationToken).ConfigureAwait(false);
return await newDoc.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
}
}
public override Task RegisterCodeFixesAsync(CodeFixContext context)
{
var document = context.Document;
var diagnostics = context.Diagnostics;
var cancellationToken = context.CancellationToken;
context.RegisterCodeFix(
new MyCodeAction(
CSharpFeaturesResources.Remove_operator_preserves_semantics,
c => FixAllAsync(document, diagnostics, negate: false, c),
RemoveOperator),
context.Diagnostics);
context.RegisterCodeFix(
new MyCodeAction(
CSharpFeaturesResources.Negate_expression_changes_semantics,
c => FixAllAsync(document, diagnostics, negate: true, c),
NegateExpression),
context.Diagnostics);
return Task.CompletedTask;
}
private static async Task<Document> FixAllAsync(
Document document, ImmutableArray<Diagnostic> diagnostics,
bool negate, CancellationToken cancellationToken)
{
var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
var editor = new SyntaxEditor(root, document.Project.Solution.Workspace);
var generator = editor.Generator;
var generatorInternal = document.GetRequiredLanguageService<SyntaxGeneratorInternal>();
foreach (var diagnostic in diagnostics)
{
var node = diagnostic.AdditionalLocations[0].FindNode(getInnermostNodeForTie: true, cancellationToken);
var left = node switch
{
BinaryExpressionSyntax binary => binary.Left,
IsPatternExpressionSyntax isPattern => isPattern.Expression,
_ => throw ExceptionUtilities.UnexpectedValue(node),
};
var suppression = (PostfixUnaryExpressionSyntax)left;
// Remove the suppression operator.
var newNode = node.ReplaceNode(
left, suppression.Operand.WithAppendedTrailingTrivia(suppression.OperatorToken.GetAllTrivia()));
// Negate the result if requested.
var final = negate
? generator.Negate(generatorInternal, newNode, semanticModel, cancellationToken)
: newNode;
editor.ReplaceNode(node, final);
}
return document.WithSyntaxRoot(editor.GetChangedRoot());
}
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string equivalenceKey)
: base(title, createChangedDocument, equivalenceKey)
{
}
}
}
}
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#nullable enable
using System.Collections.Immutable;
using Microsoft.CodeAnalysis.CodeStyle;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.CSharp.RemoveUnnecessarySuppression
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
internal class CSharpRemoveUnnecessarySuppressionDiagnosticAnalyzer : AbstractCodeStyleDiagnosticAnalyzer
{
public CSharpRemoveUnnecessarySuppressionDiagnosticAnalyzer()
: base(IDEDiagnosticIds.RemoveUnnecessarySuppressionForIsExpressionDiagnosticId,
new LocalizableResourceString(nameof(CSharpFeaturesResources.Remove_unnecessary_suppression_operator), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources)),
new LocalizableResourceString(nameof(CSharpFeaturesResources.Suppression_operator_has_no_effect_and_can_be_misinterpreted), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources)))
{
}
protected override void InitializeWorker(AnalysisContext context)
=> context.RegisterSyntaxNodeAction(AnalyzeSyntax, SyntaxKind.IsExpression, SyntaxKind.IsPatternExpression);
private void AnalyzeSyntax(SyntaxNodeAnalysisContext context)
{
var node = context.Node;
var left = node switch
{
BinaryExpressionSyntax binary => binary.Left,
IsPatternExpressionSyntax isPattern => isPattern.Expression,
_ => throw ExceptionUtilities.UnexpectedValue(node),
};
if (left.Kind() != SyntaxKind.SuppressNullableWarningExpression)
return;
context.ReportDiagnostic(DiagnosticHelper.Create(
Descriptor,
((PostfixUnaryExpressionSyntax)left).OperatorToken.GetLocation(),
ReportDiagnostic.Warn,
ImmutableArray.Create(node.GetLocation()),
properties: null));
}
}
}
......@@ -142,16 +142,36 @@
<target state="translated">Nastavit jako ref struct</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">Odebrat nepotřebná přetypování</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">Odebrat nepoužívané proměnné</target>
......@@ -177,6 +197,11 @@
<target state="translated">Seřadit modifikátory dostupnosti</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">Rozpečetit třídu {0}</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">"ref struct" erstellen</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">Nicht erforderliche Umwandlungen entfernen</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">Nicht verwendete Variablen entfernen</target>
......@@ -177,6 +197,11 @@
<target state="translated">Zugriffsmodifizierer sortieren</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">Versiegelung der Klasse "{0}" aufheben</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">Convertir "ref struct"</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">Quitar conversiones innecesarias</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">Quitar variables no utilizadas</target>
......@@ -177,6 +197,11 @@
<target state="translated">Ordenar modificadores de accesibilidad</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">Quitar el sello de la clase "{0}"</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">Définir 'ref struct'</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">Supprimer les casts inutiles</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">Supprimer les variables inutilisées</target>
......@@ -177,6 +197,11 @@
<target state="translated">Trier les modificateurs d'accessibilité</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">Classe unsealed '{0}'</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">Imposta come 'ref struct'</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">Rimuovi i cast non necessari</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">Rimuovi le variabili non usate</target>
......@@ -177,6 +197,11 @@
<target state="translated">Ordina i modificatori di accessibilità</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">Rimuovi seal dalla classe '{0}'</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">'ref struct' を作成します</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">不要なキャストを削除する</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">未使用の変数を削除する</target>
......@@ -177,6 +197,11 @@
<target state="translated">アクセシビリティ修飾子を並べ替える</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">クラス '{0}' のシールを解除</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">'ref struct'로 지정</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">불필요한 캐스트 제거</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">사용하지 않는 변수 제거</target>
......@@ -177,6 +197,11 @@
<target state="translated">접근성 한정자 정렬</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">'{0}' 클래스 봉인 해제</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">Ustaw jako „ref struct”</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">Usuń niepotrzebne rzutowania</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">Usuń nieużywane zmienne</target>
......@@ -177,6 +197,11 @@
<target state="translated">Sortuj modyfikatory dostępności</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">Odpieczętuj klasę „{0}”</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">Alterar 'ref struct'</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">Remover conversões desnecessárias</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">Remover variáveis não utilizadas</target>
......@@ -177,6 +197,11 @@
<target state="translated">Classificar modificadores de acessibilidade</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">Desselar a classe '{0}'</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">Сделать ref struct</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">Удалить ненужные приведения</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">Удалить неиспользуемые переменные</target>
......@@ -177,6 +197,11 @@
<target state="translated">Сортировать модификаторы доступности</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">Распечатать класс "{0}"</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">'ref struct' yap</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">Gereksiz atamaları kaldır</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">Kullanılmayan değişkenleri kaldır</target>
......@@ -177,6 +197,11 @@
<target state="translated">Erişilebilirlik değiştiricilerini sırala</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">'{0}' sınıfının mührünü aç</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">生成 "ref struct"</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">删除不必要的转换</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">删除未使用的变量</target>
......@@ -177,6 +197,11 @@
<target state="translated">对可访问性修饰符排序</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">Unseal 类 "{0}"</target>
......
......@@ -142,16 +142,36 @@
<target state="translated">設為 'ref struct'</target>
<note>{Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized.</note>
</trans-unit>
<trans-unit id="Negate_expression_changes_semantics">
<source>Negate expression (changes semantics)</source>
<target state="new">Negate expression (changes semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_new_modifier">
<source>Remove 'new' modifier</source>
<target state="new">Remove 'new' modifier</target>
<note />
</trans-unit>
<trans-unit id="Remove_operator_preserves_semantics">
<source>Remove operator (preserves semantics)</source>
<target state="new">Remove operator (preserves semantics)</target>
<note />
</trans-unit>
<trans-unit id="Remove_suppression_operators">
<source>Remove suppression operators</source>
<target state="new">Remove suppression operators</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_casts">
<source>Remove unnecessary casts</source>
<target state="translated">移除不必要的 Cast</target>
<note />
</trans-unit>
<trans-unit id="Remove_unnecessary_suppression_operator">
<source>Remove unnecessary suppression operator</source>
<target state="new">Remove unnecessary suppression operator</target>
<note />
</trans-unit>
<trans-unit id="Remove_unused_variables">
<source>Remove unused variables</source>
<target state="translated">移除未使用的變數</target>
......@@ -177,6 +197,11 @@
<target state="translated">排序協助工具修飾元</target>
<note />
</trans-unit>
<trans-unit id="Suppression_operator_has_no_effect_and_can_be_misinterpreted">
<source>Suppression operator has no effect and can be misinterpreted</source>
<target state="new">Suppression operator has no effect and can be misinterpreted</target>
<note />
</trans-unit>
<trans-unit id="Unseal_class_0">
<source>Unseal class '{0}'</source>
<target state="translated">為類別 '{0}' 解密</target>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册