• M
    Allow analyzers to configure generated code analysis. · f876a57f
    Manish Vasani 提交于
    1. Add a new API: AnalysisContext.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags analysisMode)
    Configures analyzer callbacks + diagnostic reporting for the analyzer. Recommended for analyzer authors to always invoke this API.
    
    2. Analyzer driver uses a heuristic to identify generated code:
      1. Symbols marked with GeneratedCodeAttribute.
      2. Files with specific extensions (see [here](http://source.roslyn.io/Microsoft.CodeAnalysis.Workspaces/R/ef3599fb042e3706.html)).
      3. Files which have a single line comment starting with <auto-generated> at the beginning of a source file.
    
    3. Driver defaults for non-configured analyzers:
      1. Run analysis on generated code: This avoids semantic breaks for analyzers and will be guaranteed to be always enabled in future.
      2. Report all diagnostics on generated code: This will likely be changed to perform some level of default filtering after #3705 is implemented.
    
    Fixes #6998
    f876a57f
VisualBasicCompilation.vb 130.6 KB