- 19 6月, 2019 1 次提交
-
-
由 Manish Vasani 提交于
Follow up to #36067 Fixes #36215
-
- 07 6月, 2019 1 次提交
-
-
由 Manish Vasani 提交于
-
- 05 6月, 2019 1 次提交
-
-
由 Manish Vasani 提交于
-
- 31 5月, 2019 1 次提交
-
-
由 Manish Vasani 提交于
Add new analyzer API (DiagnosticSuppressor) to allow programmatic suppression of analyzer and/or compiler non-error diagnostics Fixes #20242 and #30172 Detailed design proposal [here](https://gist.github.com/mavasani/fcac17a9581b5c54cef8a689eeec954a). Added public APIs with documentation comments: ```cs namespace Microsoft.CodeAnalysis.Diagnostics { /// <summary> /// The base type for diagnostic suppressors that can programmatically suppress analyzer and/or compiler non-error diagnostics. /// </summary> public abstract class DiagnosticSuppressor : DiagnosticAnalyzer { // Disallow suppressors from reporting diagnostics or registering analysis actions. public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray<DiagnosticDescriptor>.Empty; public sealed override void Initialize(AnalysisContext context) { } /// <summary> /// Returns a set of descriptors for the suppressions that this suppressor is capable of producing. /// </summary> public abstract ImmutableArray<SuppressionDescriptor> SupportedSuppressions { get; } /// <summary> /// Suppress analyzer and/or compiler non-error diagnostics reported for the compilation. /// This may be a subset of the full set of reported diagnostics, as an optimization for /// supporting incremental and partial analysis scenarios. /// A diagnostic is considered suppressible by a DiagnosticSuppressor if *all* of the following conditions are met: /// 1. Diagnostic is not already suppressed in source via pragma/suppress message attribute. /// 2. Diagnostic's <see cref="Diagnostic.DefaultSeverity"/> is not <see cref="DiagnosticSeverity.Error"/>. /// 3. Diagnostic is not tagged with <see cref="WellKnownDiagnosticTags.NotConfigurable"/> custom tag. /// </summary> public abstract void ReportSuppressions(SuppressionAnalysisContext context); } /// <summary> /// Provides a description about a programmatic suppression of a <see cref="Diagnostic"/> by a <see cref="DiagnosticSuppressor"/>. /// </summary> public sealed class SuppressionDescriptor : IEquatable<SuppressionDescriptor> { /// <summary> /// An unique identifier for the suppression. /// </summary> public string Id { get; } /// <summary> /// Identifier of the suppressed diagnostic, i.e. <see cref="Diagnostic.Id"/>. /// </summary> public string SuppressedDiagnosticId { get; } /// <summary> /// A localizable description about the suppression. /// </summary> public LocalizableString Description { get; } } /// <summary> /// Context for suppressing analyzer and/or compiler non-error diagnostics reported for the compilation. /// </summary> public struct SuppressionAnalysisContext { /// <summary> /// Suppressible analyzer and/or compiler non-error diagnostics reported for the compilation. /// This may be a subset of the full set of reported diagnostics, as an optimization for /// supporting incremental and partial analysis scenarios. /// A diagnostic is considered suppressible by a DiagnosticSuppressor if *all* of the following conditions are met: /// 1. Diagnostic is not already suppressed in source via pragma/suppress message attribute. /// 2. Diagnostic's <see cref="Diagnostic.DefaultSeverity"/> is not <see cref="DiagnosticSeverity.Error"/>. /// 3. Diagnostic is not tagged with <see cref="WellKnownDiagnosticTags.NotConfigurable"/> custom tag. /// </summary> public ImmutableArray<Diagnostic> ReportedDiagnostics { get; } /// <summary> /// Report a <see cref="Suppression"/> for a reported diagnostic. /// </summary> public void ReportSuppression(Suppression suppression); /// <summary> /// Gets a <see cref="SemanticModel"/> for the given <see cref="SyntaxTree"/>, which is shared across all analyzers. /// </summary> public SemanticModel GetSemanticModel(SyntaxTree syntaxTree); /// <summary> /// <see cref="CodeAnalysis.Compilation"/> for the context. /// </summary> public Compilation Compilation { get; } /// <summary> /// Options specified for the analysis. /// </summary> public AnalyzerOptions Options { get; } /// <summary> /// Token to check for requested cancellation of the analysis. /// </summary> public CancellationToken CancellationToken { get; } } /// <summary> /// Programmatic suppression of a <see cref="Diagnostic"/> by a <see cref="DiagnosticSuppressor"/>. /// </summary> public struct Suppression { /// <summary> /// Creates a suppression of a <see cref="Diagnostic"/> with the given <see cref="SuppressionDescriptor"/>. /// </summary> /// <param name="descriptor"> /// Descriptor for the suppression, which must be from <see cref="DiagnosticSuppressor.SupportedSuppressions"/> /// for the <see cref="DiagnosticSuppressor"/> creating this suppression. /// </param> /// <param name="suppressedDiagnostic"> /// <see cref="Diagnostic"/> to be suppressed, which must be from <see cref="SuppressionAnalysisContext.ReportedDiagnostics"/> /// for the suppression context in which this suppression is being created.</param> public static Suppression Create(SuppressionDescriptor descriptor, Diagnostic suppressedDiagnostic); /// <summary> /// Descriptor for this suppression. /// </summary> public SuppressionDescriptor Descriptor { get; } /// <summary> /// Diagnostic suppressed by this suppression. /// </summary> public Diagnostic SuppressedDiagnostic { get; } } } ``` For batch compilation, suppressors always run after all the analyzer diagnostics have been computed. For IDE partial/incremental analysis scenario, we may run the suppressors with partial diagnostics. Suppressed diagnostics from diagnostic suppressors are equivalent to source suppressed diagnostics: they show up in the error list with "Suppression State" column as "Suppressed" and are also output to errorlog as suppressed diagnostics.
-
- 17 4月, 2019 1 次提交
-
-
由 Fredric Silberberg 提交于
-
- 20 3月, 2019 1 次提交
-
-
由 Andy Gocke 提交于
In the command line compilation we try to discover when to stop the compilation stages based on if an error is produced. If the error was produced by /warnaserror, then suppressed, this should not be considered a compilation-halting error. Fixes #34101
-
- 05 1月, 2019 5 次提交
-
-
由 Jared Parsons 提交于
-
由 Jared Parsons 提交于
-
由 Jared Parsons 提交于
The design of reference assemblies, no matter whether they are generated using `/ref` or `/refout` is that they are signed if strong signing would be done for an implementation assembly. This was implemented correctly for builder based signing but not for COM based. This PR fixes the signing to be consistent.
-
由 Jared Parsons 提交于
Big chunk of usage removed with this change. Lots to go though.
-
由 Jared Parsons 提交于
The intent is to merge the providers hence having them expose a capability doesn't make any sense. The code now just infers the mode based on the arguments and always uses the `DesktopStrongNameProvider`
-
- 10 12月, 2018 3 次提交
-
-
由 dotnet-bot 提交于
-
由 dotnet-bot 提交于
-
由 dotnet-bot 提交于
-
- 25 7月, 2018 1 次提交
-
-
由 Andy Gocke 提交于
This seems to be a popular call among analyzers, especially XUnit. It's a reasonable way to acquire a well-known analyzer type, but analyzers often don't save the resulting symbol. This causes significant CPU work to be done repeatedly as XUnit looks for the same symbol over and over, passing in the same type name each time. A very small, simple cache seems to solve the problem without requiring any changes on the XUnit side.
-
- 18 7月, 2018 1 次提交
-
-
由 Neal Gafter 提交于
* Add API bool Compilation.IsSymbolAccessibleWithin( ISymbol symbol, ISymbol within, ITypeSymbol throughType = null) Also correct comments that incorrectly imply that inaccessible methods can be a member of a method group. Fixes https://github.com/dotnet/roslyn/issues/24518 Fixes https://github.com/dotnet/roslyn/issues/23842
-
- 12 6月, 2018 1 次提交
-
-
由 Tomas Matousek 提交于
-
- 05 6月, 2018 1 次提交
-
-
由 AlekseyTs 提交于
-
- 01 6月, 2018 1 次提交
-
-
由 CyrusNajmabadi 提交于
Followup to #26325 and #26330. This PR updates the IDE to forward certain helpers to these more efficient implementations. This helps things out by more quickly being able to determine if a type even contains a member with name, and thus whether or not it should even be hydrated into a symbol and have its members created. Previous we would have to do a linear scan on all the members in a type to determine this. Now this data is in a set which can be queried much more efficiently.
-
- 26 5月, 2018 1 次提交
-
-
由 Neal Gafter 提交于
Also add - CommonConversion.IsImplicit - Compilation.HasImplicitConversion Fixes #9461
-
- 11 5月, 2018 2 次提交
-
-
由 Sam Harwell 提交于
-
由 Sam Harwell 提交于
-
- 23 4月, 2018 3 次提交
-
-
由 Cyrus Najmabadi 提交于
-
由 Cyrus Najmabadi 提交于
-
由 Cyrus Najmabadi 提交于
-
- 06 4月, 2018 2 次提交
-
-
由 AlekseyTs 提交于
* Handle lock statement in control flow graph * Improve handling of IConditionalAccessOperation used at the statement level.
-
由 Omar Tawfik 提交于
* Produce errors on invalid pdbpath supplied to compiler * More tests
-
- 21 3月, 2018 1 次提交
-
-
由 Neal Gafter 提交于
-
- 08 3月, 2018 1 次提交
-
-
由 Tomáš Matoušek 提交于
* Refactor Windows PDB writer
-
- 06 3月, 2018 1 次提交
-
-
由 David Wrighton 提交于
-
- 02 3月, 2018 1 次提交
-
-
由 David Wrighton 提交于
- Update pe writer to not rely on updated System.Reflection.Metadata for arm64 support - Instead of using System.Reflection.Metadata support, write the PE as x64, and then modify it to have the correct machine. - Add support for determistic PE generation with Arm64 platform - ensure that the hash used for timedatestamp is based on the contents with the Arm64 pe flag set - Update resources to describe arm64 as a viable platform switch
-
- 21 2月, 2018 1 次提交
-
-
由 Tomáš Matoušek 提交于
* Include PDB Checksum in Debug Directory * Xlf files * Add more validation * Fix tests * Fix xplat test * Remove data signature
-
- 24 1月, 2018 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 05 12月, 2017 1 次提交
-
-
由 Sam Harwell 提交于
Fixes #23464
-
- 15 11月, 2017 1 次提交
-
-
由 Andy Gocke 提交于
-
- 14 11月, 2017 1 次提交
-
-
由 Andy Gocke 提交于
RunCore previously had a mix of diagnostic reporting methods including lists of Diagnostics, lists of DiagnosticInfos, ConcurrentQueues of Diagnostics, and just printing things directly to the console. This commit tries to simplify things by moving to using Diagnostics and DiagnosticBags wherever possible in the compile+emit phase of RunCore.
-
- 08 11月, 2017 1 次提交
-
-
由 Manish Vasani 提交于
-
- 18 10月, 2017 1 次提交
-
-
由 Manish Vasani 提交于
This reverts commit 27dc60f5.
-
- 14 10月, 2017 1 次提交
-
-
由 Manish Vasani 提交于
-
- 28 9月, 2017 1 次提交
-
-
由 Manish Vasani 提交于
-