This repository was archived by the owner on Nov 8, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
AsyncUsageAnalyzers/AsyncUsageAnalyzers Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 45
45
<Compile Include =" AnalyzerConstants.cs" />
46
46
<Compile Include =" AnalyzerExtensions.cs" />
47
47
<Compile Include =" GeneratedCodeAnalysisExtensions.cs" />
48
+ <Compile Include =" NoCodeFixAttribute.cs" />
48
49
<Compile Include =" Properties\AssemblyInfo.cs" />
49
50
<Compile Include =" Resources.Designer.cs" >
50
51
<AutoGen >True</AutoGen >
Original file line number Diff line number Diff line change
1
+ namespace AsyncUsageAnalyzers
2
+ {
3
+ using System ;
4
+ using Microsoft . CodeAnalysis . Diagnostics ;
5
+
6
+ /// <summary>
7
+ /// This attribute is applied to <see cref="DiagnosticAnalyzer"/>'s if will not get a code fix.
8
+ /// Reasons for this would be:
9
+ /// <list type="bullet">
10
+ /// <item>Visual Studio provides a built-in code fix.</item>
11
+ /// <item>A code fix could not provide a useful solution.</item>
12
+ /// </list>
13
+ /// The reason should be provided.
14
+ /// </summary>
15
+ [ AttributeUsage ( System . AttributeTargets . Class , Inherited = false , AllowMultiple = false ) ]
16
+ public sealed class NoCodeFixAttribute : System . Attribute
17
+ {
18
+ private readonly string reason ;
19
+
20
+ /// <summary>
21
+ /// Initializes a new instance of the <see cref="NoCodeFixAttribute"/> class.
22
+ /// </summary>
23
+ /// <param name="reason">The reason why the <see cref="DiagnosticAnalyzer"/> does not have a code fix.</param>
24
+ public NoCodeFixAttribute ( string reason )
25
+ {
26
+ this . reason = reason ;
27
+ }
28
+
29
+ /// <summary>
30
+ /// Gets the reason why the <see cref="DiagnosticAnalyzer"/> does not have a code fix.
31
+ /// </summary>
32
+ /// <value>
33
+ /// The reason why the <see cref="DiagnosticAnalyzer"/> does not have a code fix.
34
+ /// </value>
35
+ public string Reason
36
+ {
37
+ get { return this . reason ; }
38
+ }
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments