@@ -1262,6 +1262,7 @@ internal IEnumerable<DiagnosticRecord> GetExternalRecord(Ast ast, Token[] token,
12621262 IScriptExtent extent ;
12631263 string message = string . Empty ;
12641264 string ruleName = string . Empty ;
1265+ string ruleSuppressionID = string . Empty ;
12651266 IEnumerable < CorrectionExtent > suggestedCorrections ;
12661267
12671268 if ( psobject != null && psobject . ImmediateBaseObject != null )
@@ -1282,6 +1283,7 @@ internal IEnumerable<DiagnosticRecord> GetExternalRecord(Ast ast, Token[] token,
12821283 message = psobject . Properties [ "Message" ] . Value . ToString ( ) ;
12831284 extent = ( IScriptExtent ) psobject . Properties [ "Extent" ] . Value ;
12841285 ruleName = psobject . Properties [ "RuleName" ] . Value . ToString ( ) ;
1286+ ruleSuppressionID = psobject . Properties [ "RuleSuppressionID" ] . Value ? . ToString ( ) ;
12851287 suggestedCorrections = ( IEnumerable < CorrectionExtent > ) psobject . Properties [ "SuggestedCorrections" ] . Value ;
12861288 }
12871289 catch ( Exception ex )
@@ -1292,7 +1294,11 @@ internal IEnumerable<DiagnosticRecord> GetExternalRecord(Ast ast, Token[] token,
12921294
12931295 if ( ! string . IsNullOrEmpty ( message ) )
12941296 {
1295- diagnostics . Add ( new DiagnosticRecord ( message , extent , ruleName , severity , filePath ) { SuggestedCorrections = suggestedCorrections } ) ;
1297+ diagnostics . Add ( new DiagnosticRecord ( message , extent , ruleName , severity , filePath )
1298+ {
1299+ SuggestedCorrections = suggestedCorrections ,
1300+ RuleSuppressionID = ruleSuppressionID ,
1301+ } ) ;
12961302 }
12971303 }
12981304 }
0 commit comments