-
Notifications
You must be signed in to change notification settings - Fork 509
Expand file tree
/
Copy pathSA1317CodeFixProvider.cs
More file actions
43 lines (38 loc) · 1.49 KB
/
SA1317CodeFixProvider.cs
File metadata and controls
43 lines (38 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
#nullable disable
namespace StyleCop.Analyzers.NamingRules
{
using System.Collections.Immutable;
using System.Composition;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp;
using StyleCop.Analyzers.Helpers;
/// <summary>
/// Implements a code fix for <see cref="SA1317IdentifierShouldBeNamedOnlyWithLatinLetters"/>.
/// </summary>
/// <remarks>
/// <para>To fix a violation of this rule, replace non-Latin letters with appropriate Latin letters.</para>
/// </remarks>
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(SA1317CodeFixProvider))]
[Shared]
internal class SA1317CodeFixProvider : CodeFixProvider
{
/// <inheritdoc/>
public override ImmutableArray<string> FixableDiagnosticIds { get; } =
ImmutableArray.Create(SA1317IdentifierShouldBeNamedOnlyWithLatinLetters.DiagnosticId);
/// <inheritdoc/>
public override FixAllProvider GetFixAllProvider()
{
return null;
}
/// <inheritdoc/>
public override async Task RegisterCodeFixesAsync(CodeFixContext context)
{
await TaskHelper.CompletedTask.ConfigureAwait(false);
}
}
}