Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Roslyn's editorconfig support #590

Merged
merged 8 commits into from May 28, 2020

Conversation

JoeRobich
Copy link
Member

No description provided.

@JoeRobich
Copy link
Member Author

@jmarolf please take a look

src/Utilities/EditorConfigOptions.cs Outdated Show resolved Hide resolved
src/Workspaces/FolderWorkspace_ProjectLoader.cs Outdated Show resolved Hide resolved
src/Utilities/EditorConfigFinder.cs Outdated Show resolved Hide resolved
tests/Formatters/AbstractFormatterTests.cs Outdated Show resolved Hide resolved
src/CodeFormatter.cs Outdated Show resolved Hide resolved
@JoeRobich
Copy link
Member Author

@sharwell @jmarolf This is ready for another review.

@jasonmalinowski jasonmalinowski self-requested a review May 22, 2020 23:58
eng/Versions.props Outdated Show resolved Hide resolved
src/Workspaces/FolderWorkspace_ProjectLoader.cs Outdated Show resolved Hide resolved
src/dotnet-format.csproj Show resolved Hide resolved
src/CodeFormatter.cs Outdated Show resolved Hide resolved
src/CodeFormatter.cs Show resolved Hide resolved
var analyzerConfigOptions = await GetAnalyzerConfigOptionsAsync(document, cancellationToken).ConfigureAwait(false);
var optionSet = await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false);

var formattableDocument = new DocumentWithOptions(document, optionSet, analyzerConfigOptions);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is DocumentWithOptions needed if we can fetch the OptionSet when you need it later or potentially the AnalyzerConfigOptions too? Is this just a perf optimization or needed for something else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I was saving work, but you are right. Since nothing in the solution is changing and these are cached within the DocumentState and AnalyzerConfigSet respectively. This could just return document ids and we could fetch everything again later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take this suggestion as a follow up refactoring. #691

@JoeRobich JoeRobich merged commit a22d39f into dotnet:master May 28, 2020
@JoeRobich JoeRobich deleted the roslyn-editorconfig branch March 5, 2021 21:02
vdurante pushed a commit to vdurante/format that referenced this pull request Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants