@@ -25,9 +25,6 @@ public partial class HardwireSourceGenerator : ISourceGenerator
25
25
"Type '{0}' from AdditionalFile '{1}' could not be resolved." ,
26
26
"WattleScript.HardwireGen" , DiagnosticSeverity . Warning , true ) ;
27
27
28
- private static DiagnosticDescriptor Timing = new ( "MS9999" , "Generation duration" ,
29
- "Hardwire generation took '{0}'ms" , "WattleScript.HardwireGen" , DiagnosticSeverity . Info , true ) ;
30
-
31
28
public void Initialize ( GeneratorInitializationContext context )
32
29
{
33
30
context . RegisterForSyntaxNotifications ( ( ) => new UserDataSyntaxReceiver ( ) ) ;
@@ -180,6 +177,7 @@ public void Execute(GeneratorExecutionContext context)
180
177
181
178
var writer = new TabbedWriter ( ) ;
182
179
writer . AppendLine ( "// <auto-generated />" ) ;
180
+ writer . AppendLine ( "// ReSharper disable All" ) ;
183
181
writer . Append ( "partial class " ) . AppendLine ( name ) ;
184
182
writer . AppendLine ( "{" ) . Indent ( ) ;
185
183
writer . AppendLine ( "public static void Initialize()" ) ;
@@ -193,7 +191,6 @@ public void Execute(GeneratorExecutionContext context)
193
191
writer . UnIndent ( ) . AppendLine ( "}" ) ;
194
192
context . AddSource ( $ "{ name } .g.cs", writer . ToString ( ) ) ;
195
193
sw . Stop ( ) ;
196
- context . ReportDiagnostic ( Diagnostic . Create ( Timing , null , sw . Elapsed . TotalMilliseconds ) ) ;
197
194
}
198
195
catch ( Exception e )
199
196
{
@@ -260,6 +257,7 @@ void GenerateCode(ref GeneratorExecutionContext context, string containingName,
260
257
Dictionary < string , TypeMethod > methods = new Dictionary < string , TypeMethod > ( ) ;
261
258
Dictionary < string , TypeField > fields = new Dictionary < string , TypeField > ( ) ;
262
259
builder . AppendLine ( "// <auto-generated />" ) ;
260
+ builder . AppendLine ( "// ReSharper disable All" ) ;
263
261
builder . Append ( "// UserData description for: " ) . AppendLine ( typeName ) ;
264
262
265
263
builder . Append ( "internal partial class " ) . Append ( containingName ) . AppendLine ( ) . AppendLine ( "{" ) . Indent ( ) ;
0 commit comments