- 02 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.
-
- 24 5月, 2019 1 次提交
-
-
由 Joey Robichaud 提交于
-
- 23 5月, 2019 2 次提交
-
-
由 Joey Robichaud 提交于
-
由 Charles Stoner 提交于
-
- 21 5月, 2019 2 次提交
-
-
由 dotnet-maestro[bot] 提交于
* Update dependencies from https://github.com/dotnet/arcade build 20190503.8 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19253.8 * Update dependencies from https://github.com/dotnet/arcade build 20190504.1 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19254.1 * Update dependencies from https://github.com/dotnet/arcade build 20190505.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19255.2 * Update dependencies from https://github.com/dotnet/arcade build 20190506.12 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19256.12 * Update dependencies from https://github.com/dotnet/arcade build 20190507.7 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19257.7 * Update dependencies from https://github.com/dotnet/arcade build 20190508.5 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19258.5 * Update dependencies from https://github.com/dotnet/arcade build 20190509.9 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19259.9 * Update dependencies from https://github.com/dotnet/arcade build 20190510.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19260.2 * Update dependencies from https://github.com/dotnet/arcade build 20190511.1 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19261.1 * Update dependencies from https://github.com/dotnet/arcade build 20190512.1 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19262.1 * Update dependencies from https://github.com/dotnet/arcade build 20190513.3 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19263.3 * Update dependencies from https://github.com/dotnet/arcade build 20190514.13 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19264.13 * Update dependencies from https://github.com/dotnet/arcade build 20190516.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19266.2 * Update dependencies from https://github.com/dotnet/arcade build 20190516.4 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19266.4 * Update dependencies from https://github.com/dotnet/arcade build 20190517.7 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19267.7 * Update dependencies from https://github.com/dotnet/arcade build 20190518.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19268.2 * Update dependencies from https://github.com/dotnet/arcade build 20190520.1 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19270.1 * Fix up XLF files * Clear AssemblyVersion
-
由 Joey Robichaud 提交于
* Separate script arguments from the script file for InteractiveCompiler tasks * Added command line arguments as quoted text
-
- 18 5月, 2019 2 次提交
-
-
由 Julien Couvreur 提交于
-
由 Tomáš Matoušek 提交于
* Revert "Revert "Make compilation outputs available via a workspace service (#34809)"" This reverts commit f4892bc4. * Handle non-absolute path set by VB Web App IntelliSense project
-
- 16 5月, 2019 4 次提交
-
-
由 Julien Couvreur 提交于
-
由 Sam Harwell 提交于
-
由 Sam Harwell 提交于
-
由 Sam Harwell 提交于
Closes #35071
-
- 14 5月, 2019 1 次提交
-
-
由 Sam Harwell 提交于
-
- 13 5月, 2019 1 次提交
-
-
由 David Poeschl 提交于
This reverts commit 3bdbd560.
-
- 11 5月, 2019 1 次提交
-
-
由 David Poeschl 提交于
This reverts commit 3bdbd560.
-
- 10 5月, 2019 2 次提交
-
-
由 Andy Gocke 提交于
A PROTOTYPE comment snuck its way into master. It described some a possible interpretation for the editorconfig parser on line continuations, but I don't think we should do it, so the correct fix is to remove the comment.
-
由 Julien Couvreur 提交于
-
- 07 5月, 2019 2 次提交
-
-
由 Rikki Gibson 提交于
* Symbol display for readonly members * Add coverage * Test malformed properties and events * Show readonly keyword on non-field members in QuickInfo * Use IsDeclaredReadOnly for symbol display (WIP) * Update based on design and fix some test failures * Add readonly keywords to various IL tests * Fix more tests, respond to feedback * Fix compile error * Don't display readonly keyword for implicit readonly getters from source * Don't show readonly keyword for members contained within a readonly struct * Move from extension methods to private statics
-
由 Julien Couvreur 提交于
-
- 04 5月, 2019 1 次提交
-
-
由 AlekseyTs 提交于
Closes #28834. Closes #30061.
-
- 03 5月, 2019 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 02 5月, 2019 2 次提交
-
-
由 Tomáš Matoušek 提交于
* Remove RoslynProjectType * Remove ToolsVersion, namespace from Project tags * Remove updating of MSBuildAllProjects * Update BuildBoss * Delete DeployTooolsetCompiler
-
由 Tomáš Matoušek 提交于
-
- 30 4月, 2019 3 次提交
-
-
由 Neal Gafter 提交于
Fixes #30069
-
由 Tomáš Matoušek 提交于
-
由 Tom Meschter 提交于
The `CoreCompile` targets for C# and VB were both passing the set of `PotentialEditorConfigFiles` to the `PotentialAnalyzerConfigFiles` input parameter of `CscTask`/`VbcTask`. However, this parameter no longer exists. At one point in the development of the editorconfig-in-compiler feature we had a separate MSBuild task that would compute both the actual and potential .editorconfig file paths and pass them to the task. These are now computed as part of the MSBuild evaluation pass, and the potential .editorconfig files are passed to the project systems via a separate target (`GetPotentialEditorConfigFiles` in Microsoft.Common.CurrentVersion.targets).
-
- 20 4月, 2019 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 19 4月, 2019 2 次提交
-
-
由 Fredric Silberberg 提交于
-
由 Sam Harwell 提交于
Roslyn.Compilers.VisualBasic.Test.Utilities.Desktop incorrectly added in a70cdce6 VBCSCompilerPortable removed in b2bd77b0 Microsoft.CodeAnalysis.CompilerServer removed in b00224e7 Roslyn.VisualStudio.Test.Utilities.Next renamed in e0e16d7a Microsoft.CodeAnalysis.Scripting.Destkop.UnitTests never existed (typo) Roslyn.DebuggerVisualizers removed in d7e49395 Microsoft.VisualStudio.LanguageServices.VisualBasic.UnitTests never existed (typo in 7ab3b776) Roslyn.Services.Editor.CSharp.UnitTests2 renamed in bb1f97b6
-
- 18 4月, 2019 4 次提交
-
-
由 Sam Harwell 提交于
See #35071
-
由 Sam Harwell 提交于
Roslyn.Compilers.CompilerServer.UnitTests removed in 24721202 Roslyn.Test.Utilities.CoreClr removed in cf58bbcb Roslyn.Test.Utilities.Desktop removed in cf58bbcb Roslyn.Compilers.CSharp.PerformanceTests removed in cd333330 Roslyn.Test.Utilities.FX45 removed in b77c5473 Roslyn.Compilers.VisualBasic.PerformanceTests never existed (typo from 3c14b040) Roslyn.Compilers.CSharp.Test.Utilities.Desktop removed in edd89e4e
-
由 Sam Harwell 提交于
-
由 Sam Harwell 提交于
Closes #35102
-
- 17 4月, 2019 1 次提交
-
-
由 Fredric Silberberg 提交于
-
- 13 4月, 2019 2 次提交
-
-
由 Jason Malinowski 提交于
-
由 Andy Gocke 提交于
Implements most of the design changes specified in https://github.com/dotnet/csharplang/blob/c229cae634bd59a6a13b9ed464a4cab782a95e5d/proposals/index-range-changes.md This PR focuses on getting the simple end-to-end scenario working, not focusing entirely on codegen quality. I expect to follow-up later with the optimizations mentioned about eliminating use of the Index/Range helpers entirely if they can be elided.
-
- 11 4月, 2019 1 次提交
-
-
由 Andy Gocke 提交于
Implements the bracket syntax from Unix globs (https://en.wikipedia.org/wiki/Glob_(programming)), commonly referred to as "character classes" in regular expressions.
-
- 10 4月, 2019 1 次提交
-
-
由 Tomáš Matoušek 提交于
* Add SelectAsArray, DangerousCreateFromUnderlyingArray * Add SerializableBytes.ToImmutableArray
-
- 08 4月, 2019 1 次提交
-
-
由 Neal Gafter 提交于
Fixes #34766 Previously, every instance of `LocalState` required allocation. Now we use `BitVector`, which stores state information inline in the bits of a primitive. With the previous implementation of `BitVector` (32 bits inline), only about 1.3% of our nullable tests require allocating any memory at all for nullable states. However, I've updated `BitVector` to have 64 bits inline, and now only three of our tests require allocating memory for states. Those three tests heavily exercise tuple conversions.
-