{"push_id":905725448,"size":1,"distinct_size":1,"ref":"refs/heads/ConfigureGeneratedCodeAnalysis","head":"79a725bd3be4ae7fadc858b41baf1d4abf9ce393","before":"1eed4cf4b3d64342de9b1df7483abba4a1fe8f50","commits":[{"sha":"79a725bd3be4ae7fadc858b41baf1d4abf9ce393","author":{"email":"01f5fa50e82e0264ef90a54b019bc69338acfad2@microsoft.com","name":"Manish Vasani"},"message":"Reduce noise from analyzers in generated code and allow analyzers to configure generated code analysis.\n\n1. Add a new API: AnalysisContext.ConfigureGeneratedCodeAnalysis(bool enable)\nConfigures analyzer callbacks + diagnostic reporting for the analyzer. Recommended for analyzer authors to always invoke this API.\n\n2. Analyzer driver uses a heuristic to identify generated code:\n  1. Symbols marked with GeneratedCodeAttribute.\n  2. Files with specific extensions (see [here](http://source.roslyn.io/Microsoft.CodeAnalysis.Workspaces/R/ef3599fb042e3706.html)).\n  3. Files which have a single line comment starting with  <auto-generated> at the beginning of a source file.\n\n3. Driver defaults for non-configured analyzers:\n  1. Always run analysis on generated code: This avoids semantic breaks for analyzers.\n  2. Suppress non-critical diagnostics reported on generated code: This ensures\n    1. No silent breaks for end users: Critical diagnostics marked as errors, such as banned crypto API, DeclarePublicAPI diagnostics are still reported in generated code.\n    2. Reduces noise from analyzer output: addresses our primary complaint\n  3. Driver defaults are liable to change in future. Analyzer authors are recommended to ConfigureGeneratedCodeAnalysis if they want a specific behavior for generated code.\n\nFixes #6998","distinct":true,"url":"https://api.github.com/repos/mavasani/roslyn/commits/79a725bd3be4ae7fadc858b41baf1d4abf9ce393"}]}