Merged
Conversation
2047746 to
a930435
Compare
ryzngard
approved these changes
Mar 16, 2022
src/Workspaces/VisualBasicTest/CodeGeneration/AddImportsTests.vb
Outdated
Show resolved
Hide resolved
This was referenced Mar 18, 2022
Contributor
|
Integration tests showing gold bar |
579ac53 to
5a8b5e2
Compare
003608b to
21d8d35
Compare
src/EditorFeatures/CSharp/Simplification/CSharpGlobalIdeOptionsProvider.cs
Outdated
Show resolved
Hide resolved
| Else | ||
| simplifiedDocument = Await Simplifier.ReduceAsync(document, Simplifier.Annotation, optionSet) | ||
| End If | ||
| #Enable Warning RS0030 |
Contributor
There was a problem hiding this comment.
could just update this to use the new apis right?
src/EditorFeatures/VisualBasic/Simplification/VisualBasicSimplifierOptionsStorage.vb
Outdated
Show resolved
Hide resolved
...ixes/Suppression/AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs
Show resolved
Hide resolved
|
|
||
| public MetadataAsSourceOptions() | ||
| : this(NavigateToDecompiledSources: true) | ||
| : this(SimplifierOptions: null) |
Contributor
There was a problem hiding this comment.
aside: i'm not really a fan of using structs here primarily because i find having to reason about no-param constructors (vs, all optional constructors) so painful. Consider moving these to classes.
src/Features/Core/Portable/Options/IGlobalIdeOptionsProvider.cs
Outdated
Show resolved
Hide resolved
...s/CSharp/Portable/Simplification/Reducers/AbstractCSharpReducer.AbstractReductionRewriter.cs
Show resolved
Hide resolved
...s/CSharp/Portable/Simplification/Reducers/AbstractCSharpReducer.AbstractReductionRewriter.cs
Show resolved
Hide resolved
| { | ||
| Contract.ThrowIfNull(ParseOptions); | ||
| Debug.Assert(Options != null); | ||
| Debug.Assert(SemanticModel != null); |
Contributor
There was a problem hiding this comment.
just use Contract.ThrowIfNull for all of htem :)
src/Workspaces/CSharp/Portable/Simplification/Reducers/AbstractCSharpReducer.cs
Show resolved
Hide resolved
src/Workspaces/CSharp/Portable/Simplification/Reducers/AbstractCSharpReducer.cs
Outdated
Show resolved
Hide resolved
...haredUtilitiesAndExtensions/Workspace/Core/LanguageServices/AddImports/IAddImportsService.cs
Show resolved
Hide resolved
CyrusNajmabadi
approved these changes
Apr 14, 2022
333fred
added a commit
that referenced
this pull request
Apr 14, 2022
…res/required-members * upstream/main: (66 commits) Fix #55183: Add SymbolVisitor<TArgument, TResult> (#56530) Simplifier options (#60174) Remove duplicated asset Do not try to refcount solution syncing when communicating with OOP Delay symbol-search index updating until solution is fully loaded. add more miscellaneous tests for checked operators (#60727) Support checked operators in explicit interface implementation (#60715) Avoid formatting diagnostics with raw strings (#60655) Make heading levels for warning waves documentation consistent (#60721) Clean up IDiagnosticService extension methods Remove #nullable enable Add integration test to flag MEF composition breaks Generate static abstract interface members correctly (#60618) Merge release/dev17.2 to main (#60682) Fix FAR on checked operators (#60698) Add implement interface support for checked operators and cast operators (#60719) Update csc.dll path in launch.json (#60663) Grab bag of UTF8 string support in IDE features (#60599) Allow code actions to retrieve options for any language (#60697) Fix flaky VSTypeScriptHandlerTests (#60706) ...
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Apr 15, 2022
…o setsrequiredmembers * upstream/features/required-members: (66 commits) Fix dotnet#55183: Add SymbolVisitor<TArgument, TResult> (dotnet#56530) Simplifier options (dotnet#60174) Remove duplicated asset Do not try to refcount solution syncing when communicating with OOP Delay symbol-search index updating until solution is fully loaded. add more miscellaneous tests for checked operators (dotnet#60727) Support checked operators in explicit interface implementation (dotnet#60715) Avoid formatting diagnostics with raw strings (dotnet#60655) Make heading levels for warning waves documentation consistent (dotnet#60721) Clean up IDiagnosticService extension methods Remove #nullable enable Add integration test to flag MEF composition breaks Generate static abstract interface members correctly (dotnet#60618) Merge release/dev17.2 to main (dotnet#60682) Fix FAR on checked operators (dotnet#60698) Add implement interface support for checked operators and cast operators (dotnet#60719) Update csc.dll path in launch.json (dotnet#60663) Grab bag of UTF8 string support in IDE features (dotnet#60599) Allow code actions to retrieve options for any language (dotnet#60697) Fix flaky VSTypeScriptHandlerTests (dotnet#60706) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
(CSharp|VisualBasic)SimplifierOptionscontaining all code style options used by simplifiers.The first commit introduces SimplifierOptions and threads them through.
Since these options are editorconfig options we also need to pass around "fallback options" that are used when a simplifier option is not specified in the editorconfig files applicable to the given document. The fallback options are only available in the IDE - they are stored in the registry and accessed via
IGlobalOptionService. In this PR fallback options are not required since we still fall back from DocumentOptions to the solution options. To limit the size of the PR some call sites that create options passnullfallback options -- these will be updated in a follow up PR.Since the set of available simplifier options is language specific, we can't use a single
SimplifierOptionsStorageextension method defined forIGlobalOptionServiceas it does not know how to construct the derived option types. We introduceISimplifierOptionStoragelanguage service for that purpose.Recommended to review commit by commit. The first commit already reviewed by @ryzngard.