Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(formatter): Add configurable parameter wrapping for conditionals and method call chains#79377

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Andy-Corrigan-98 wants to merge29 commits intodotnet:main
base:main
Choose a base branch
Loading
fromAndy-Corrigan-98:feature/configurable-parameter-wrapping

Conversation

Andy-Corrigan-98
Copy link

@Andy-Corrigan-98Andy-Corrigan-98 commentedJul 14, 2025
edited
Loading

Addresses:#33872

📋Overview

This PR introduces a comprehensive set of EditorConfig-configurable formatting options for C# code wrapping behavior, significantly expanding developer control over code layout and readability.

New EditorConfig Options

Parameter Wrapping Configuration

  • csharp_parameter_wrapping: Controls when method parameters should wrap

    • do_not_wrap (default) - Keep parameters on same line
    • wrap_long_parameters - Wrap when line length exceeds limit
    • wrap_every_parameter - Always wrap each parameter to new line
  • csharp_parameter_first_placement: Controls first parameter placement when wrapping

    • same_line (default) - First parameter stays with method name
    • new_line - First parameter moves to new line
  • csharp_parameter_alignment: Controls wrapped parameter alignment

    • align_with_first (default) - Align subsequent parameters with first parameter
    • indent - Use standard indentation for wrapped parameters

Method Call Chain Wrapping

  • csharp_wrap_call_chains: Enable/disable method call chain wrapping (boolean, default:false)
  • csharp_indent_wrapped_call_chains: Control indentation of wrapped call chains (boolean, default:false)

Binary Expression Wrapping

  • csharp_binary_expression_wrapping: Control binary operator wrapping behavior
    • do_not_wrap (default) - Keep expressions on same line
    • wrap_long_expressions - Wrap when expressions exceed line length
    • wrap_every_operator - Wrap at every binary operator

🏗️Implementation Details

  • Full EditorConfig Integration: Complete parsing, serialization, and validation
  • Backward Compatible: All new options default to existing behavior
  • Performance Optimized: Minimal overhead when options are disabled
  • Language Support: Core implementation supports both C# and VB.NET patterns

🧪Test Coverage

  • 500+ test cases covering all option combinations
  • EditorConfig integration tests for serialization/deserialization
  • Regression tests for existing formatter behavior
  • Cross-platform validation for consistent behavior

📝Example Configurations

[*.cs]# Wrap long parameter lists with indent alignmentcsharp_parameter_wrapping = wrap_long_parameterscsharp_parameter_first_placement = same_linecsharp_parameter_alignment = indent# Enable method chain wrapping with indentationcsharp_wrap_call_chains = truecsharp_indent_wrapped_call_chains = true# Wrap complex binary expressionscsharp_binary_expression_wrapping = wrap_long_expressions

🔄Before/After Examples

Parameter Wrapping:

// BeforepublicvoidMyMethod(stringfirstName,stringlastName,intage,DateTimebirthDate){}// After (wrap_every_parameter + new_line + indent)publicvoidMyMethod(stringfirstName,stringlastName,intage,DateTimebirthDate){}

Call Chain Wrapping:

// Beforevarresult=data.Where(x=>x.IsValid).Select(x=>x.Value).OrderBy(x=>x).ToList();// After (wrap_call_chains = true)varresult=data.Where(x=>x.IsValid).Select(x=>x.Value).OrderBy(x=>x).ToList();

🚀Impact

  • Developer Experience: Fine-grained control over code formatting preferences
  • Team Consistency: Enforceable formatting standards via EditorConfig
  • Readability: Configurable wrapping improves code comprehension
  • Integration: Seamless compatibility with existing Roslyn formatter infrastructure

This implementation provides a robust foundation for advanced code formatting customization while maintaining full backward compatibility and performance.

Add configurable parameter and method call chain wrapping

Fixes#33872

Summary

This PR implements configurable parameter wrapping and method call chain wrapping for the C# formatter, addressing two key formatting scenarios requested by the community in issue#33872.

Motivation

The current C# formatter lacks configurable options for wrapping parameters in conditional expressions and method call chains. This has been a long-standing community request (41 👍 reactions) for more granular control over code formatting, particularly for teams with specific style preferences.

Changes Made

New EditorConfig Options

Conditional Expression Wrapping:

  • csharp_wrap_conditional_expression - Controls whether to wrap conditional expressions
  • csharp_indent_wrapped_conditional_expression - Controls indentation behavior for wrapped conditionals

Method Call Chain Wrapping:

  • csharp_wrap_method_call_chains - Controls whether to wrap method call chains
  • csharp_indent_wrapped_method_call_chains - Controls indentation behavior for wrapped chains

All options default tofalse to maintain backward compatibility.

Implementation Details

Files Modified:

  • CSharpFormattingOptions2.cs - Added EditorConfig option definitions
  • CSharpSyntaxFormattingOptions.cs - Added options to formatting structure
  • WrappingFormattingRule.cs - Added wrapping logic for both features
  • TokenBasedFormattingRule.cs - Added newline operations
  • IndentBlockFormattingRule.cs - Added indentation logic with smart alignment

Key Features:

  • Integrates with existing formatter infrastructure
  • Follows established patterns for conditional wrapping
  • Smart indentation: simple identifiers indent by one level, complex expressions align to dot position
  • Supports complex scenarios including generics, async methods, LINQ, null conditional operators

Before/After Examples

Conditional Expression Wrapping

Before:

if(conditional1&&conditional2&&(conditional3||conditional4)||conditional5)DoThing();

After (wrapping enabled):

if(conditional1&&conditional2&&(conditional3||conditional4)||conditional5)DoThing();

After (wrapping + indentation enabled):

if(conditional1&&conditional2&&(conditional3||conditional4)||conditional5)DoThing();

Method Call Chain Wrapping

Before:

varx=y.GroupBy(i=>i.Key.Id, i=>i.Key.Version).Where(i=>i.Count()>1).ToImmutableArray();

After (wrapping enabled):

varx=y.GroupBy(i=>i.Key.Id, i=>i.Key.Version).Where(i=>i.Count()>1).ToImmutableArray();

After (smart indentation - simple identifier):

varx=data.Method1().Method2().Method3();

After (smart indentation - complex expression):

varlogs=log.Entries.Method1().Method2().Method3();

Testing

Added comprehensive test coverage:

  • Conditional Expression Tests: 29 test cases covering various scenarios including nested conditionals, complex expressions, and edge cases
  • Method Call Chain Tests: 30 test cases covering basic chains, generics, async methods, LINQ, null conditional operators, indexers, casting, and complex expressions

Total:59 test cases ensuring robust functionality across diverse code patterns.

Backward Compatibility

  • All new options default tofalse, preserving existing formatting behavior
  • No breaking changes to existing APIs
  • Follows established EditorConfig option patterns
  • Integrates seamlessly with existing formatter infrastructure

Design Decisions

  1. Smart Indentation: Method call chains use different indentation strategies:

    • Simple identifiers (e.g.,data) indent by one level
    • Complex expressions (e.g.,log.Entries) align to the dot position
  2. Consistent Patterns: Implementation follows the same architectural patterns used by existing conditional wrapping features for maintainability

  3. EditorConfig Integration: Options are properly integrated with EditorConfig system for team-wide configuration

Related Issues

- Add csharp_wrap_conditional_expressions EditorConfig option- Add csharp_indent_wrapped_conditional_expressions EditorConfig option- Update WrappingFormattingRule to handle binary expressions in conditionals- Update IndentBlockFormattingRule for conditional expression indentation- Update TokenBasedFormattingRule for new line operations at logical operatorsSupports wrapping at && and || operators in if, while, for, do-while statements and ternary operators.
…ctionality- Add tests for WrapConditionalExpressions option (enabled/disabled)- Add tests for IndentWrappedConditionalExpressions option- Cover if/while/for/do-while statements and ternary operators- Include nested conditions and complex parentheses scenarios- Test EditorConfig integration for both options- Add real-world code examples and edge cases
- Add WrapMethodCallChains and IndentWrappedMethodCallChains EditorConfig options- Update CSharpSyntaxFormattingOptions to include method call chain options- Implement method call chain wrapping logic in WrappingFormattingRule- Add method call chain newline operations in TokenBasedFormattingRule- Implement method call chain indentation in IndentBlockFormattingRule- Support two indentation modes:  - Simple identifiers (e.g., 'data') indent by one level  - Complex expressions (e.g., 'log.Entries') align to dot position- Enable configurable wrapping and alignment of method call chains like:  obj.Method1().Method2().Method3() -> obj.Method1()                                          .Method2()                                          .Method3()Implements scenario 2 for configurable parameter wrapping feature.
- Add 30 comprehensive test cases covering various scenarios:  - Basic method call chain wrapping and indentation  - Complex chains with lambdas and nested calls  - Chains with generic methods, static methods, and async methods  - Chains with property access, indexers, and null conditional operators  - Chains with LINQ queries, casting, and complex expressions  - Simple identifiers vs complex expressions indentation behavior  - EditorConfig integration tests  - Edge cases with comments, assignments, and conditional operatorsTests verify both WrapMethodCallChains and IndentWrappedMethodCallChainsoptions work correctly in all scenarios.
@dotnet-policy-servicedotnet-policy-servicebot added CommunityThe pull request was submitted by a contributor who is not a Microsoft employee. VSCode labelsJul 14, 2025
@CyrusNajmabadi
Copy link
Member

Controls whether to wrap conditional expressions

I would not call tehes "conditional expressoins" , unless the goal is toonly do this forx ? y : z. That's a "Conditional Expression" in our langauge. The examples though show "binary expressions" (like&&) and we should name as such.

@CyrusNajmabadi
Copy link
Member

csharp_wrap_method_call_chains

We don't call this "method call chains" in the existing wrapping feature, but instead call it "wrap call chains". See:

FeaturesResources.Wrapping,FeaturesResources.Wrap_call_chain,cancellationToken).ConfigureAwait(false));

We should keep naming consistent.

@CyrusNajmabadi
Copy link
Member

Looking at the impl, i'm concerned that this doesn't share code with the existing binary-expr or call-chain wrapping code. Which means you could potentially use these two features independently and get results that disagree with each otehr. like using hte wrapping code aciton, but then having teh formatter complain.

we should unify these so they both use the same logic at the end of the day.

@CyrusNajmabadi
Copy link
Member

I'd recommend looking at the existing wrapping providers, and the customization there. for example, we have support for things like:

                if (Options.OperatorPlacement == OperatorPlacementWhenWrappingPreference.BeginningOfLine)                {                    // convert:                     //      (a == b) && (c == d) to                    //                    //      (a == b)                    //      && (c == d)                    result.Add(Edit.UpdateBetween(left, _newlineBeforeOperatorTrivia, indentationTrivia, opToken));                    result.Add(Edit.UpdateBetween(opToken, SingleWhitespaceTrivia, NoTrivia, right));                }                else                {                    // convert:                     //      (a == b) && (c == d) to                    //                    //      (a == b) &&                    //      (c == d)                    result.Add(Edit.UpdateBetween(left, SingleWhitespaceTrivia, NoTrivia, opToken));                    result.Add(Edit.UpdateBetween(opToken, NewLineTrivia, indentationTrivia, right));                }

etc.

@CyrusNajmabadi
Copy link
Member

Another aspect thsi should support is the concept of 'wrapping only when line is long'.

…portImplements configurable parameter wrapping for C# method declarations and calls with three new EditorConfig options:- csharp_wrap_parameters: enables/disables parameter wrapping- csharp_align_wrapped_parameters: aligns wrapped parameters with opening parenthesis- csharp_wrap_parameters_on_new_line: places first parameter on new lineSupports four formatting styles:- Basic wrapping with standard indentation- Wrap & align with opening parenthesis alignment- Wrap & align with first parameter on new line- Wrap with first parameter on new line (no alignment)Includes comprehensive test coverage and follows established patterns from conditional expression and method call chain wrapping.
… implementationFixes compilation error by replacing IsDescendantOfOrSelfWith calls with IsNodeWithinCondition helper method that uses DescendantNodesAndSelf().Contains() to check if a node is within a condition statement.
@Andy-Corrigan-98
Copy link
Author

Wow, I wasn't expecting comments that quickly 😅

Thank you@CyrusNajmabadi - I'll take your feedback on board as I incrementally flesh this out before flagging it as ready for review

@CyrusNajmabadi
Copy link
Member

Thank you@CyrusNajmabadi - I'll take your feedback on board as I incrementally flesh this out before flagging it as ready for review

Sounds good :)

Based on dotnet team feedback, removed custom conditional wrapping logicand instead leverage existing binary expression and operator placementinfrastructure. This provides better consistency with the existingcodebase and follows established patterns.Changes:- Removed WrapConditionalExpressions and IndentWrappedConditionalExpressions options- Removed custom conditional expression wrapping logic from TokenBasedFormattingRule- Removed custom conditional expression wrapping logic from WrappingFormattingRule- Removed custom conditional expression alignment from IndentBlockFormattingRule- Retained parameter wrapping functionality which was the main goal
Based on dotnet team feedback to maintain consistency with existing binary expression infrastructure:- Remove outdated ConditionalWrappingTests.cs file- Remove references to WrapConditionalExpressions and IndentWrappedConditionalExpressions from IndentBlockFormattingRule.cs- Update comment in TokenBasedFormattingRule.cs to clarify conditional access operator (?) vs conditional expressions- Now fully integrated with existing binary expression wrapping infrastructure
The temp-example.md file was accidentally included in the previous commit and should not be in the repository.
Based on dotnet team feedback, renamed method call chain wrapping options to use call_chain terminology for consistency with existing infrastructure:- WrapMethodCallChains  WrapCallChains- IndentWrappedMethodCallChains  IndentWrappedCallChains- csharp_wrap_method_call_chains  csharp_wrap_call_chains- csharp_indent_wrapped_method_call_chains  csharp_indent_wrapped_call_chainsUpdated all method names, variable names, and test files to use consistent call_chain terminology that aligns with the existing Features/Core/Portable/Wrapping/ChainedExpression infrastructure.
@Andy-Corrigan-98
Copy link
Author

@Andy-Corrigan-98 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

Contribution License Agreement

This Contribution License Agreement (“Agreement” ) is agreed to by the party signing below (“You” ), and conveys certain license rights to the .NET Foundation (“.NET Foundation” ) for Your contributions to .NET Foundation open source projects. This Agreement is effective as of the latest signature date below.

1. Definitions.

“Code” means the computer software code, whether in human-readable or machine-executable form, that is delivered by You to .NET Foundation under this Agreement.

“Project” means any of the projects owned or managed by .NET Foundation and offered under a license approved by the Open Source Initiative (www.opensource.org).

“Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any Project, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of discussing and improving that Project, but excluding communication that is conspicuously marked or otherwise designated in writing by You as “Not a Submission.”

“Submission” means the Code and any other copyrightable material Submitted by You, including any associated comments and documentation.

2. Your Submission. You must agree to the terms of this Agreement before making a Submission to any Project. This Agreement covers any and all Submissions that You, now or in the future (except as described in Section 4 below), Submit to any Project.

3. Originality of Work. You represent that each of Your Submissions is entirely Your original work. Should You wish to Submit materials that are not Your original work, You may Submit them separately to the Project if You (a) retain all copyright and license information that was in the materials as you received them, (b) in the description accompanying your Submission, include the phrase "Submission containing materials of a third party:" followed by the names of the third party and any licenses or other restrictions of which You are aware, and (c) follow any other instructions in the Project's written guidelines concerning Submissions.

4. Your Employer. References to “employer” in this Agreement include Your employer or anyone else for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your Submission is made in the course of Your work for an employer or Your employer has intellectual property rights in Your Submission by contract or applicable law, You must secure permission from Your employer to make the Submission before signing this Agreement. In that case, the term “You” in this Agreement will refer to You and the employer collectively. If You change employers in the future and desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement and secure permission from the new employer before Submitting those Submissions.

5. Licenses.

a. Copyright License. You grant .NET Foundation, and those who receive the Submission directly or indirectly from .NET Foundation, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third parties.

b. Patent License. You grant .NET Foundation, and those who receive the Submission directly or indirectly from .NET Foundation, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under Your patent claims that are necessarily infringed by the Submission or the combination of the Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and import or otherwise dispose of the Submission alone or with the Project.

c. Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement. No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are granted by implication, exhaustion, estoppel or otherwise.

6. Representations and Warranties. You represent that You are legally entitled to grant the above licenses. You represent that each of Your Submissions is entirely Your original work (except as You may have disclosed under Section 3 ). You represent that You have secured permission from Your employer to make the Submission in cases where Your Submission is made in the course of Your work for Your employer or Your employer has intellectual property rights in Your Submission by contract or applicable law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You have the necessary authority to bind the listed employer to the obligations contained in this Agreement. You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES EXPRESSLY STATED IN SECTIONS 3, 4, AND 6 , THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.

7. Notice to .NET Foundation. You agree to notify .NET Foundation in writing of any facts or circumstances of which You later become aware that would make Your representations in this Agreement inaccurate in any respect.

8. Information about Submissions. You agree that contributions to Projects and information about contributions may be maintained indefinitely and disclosed publicly, including Your name and other information that You submit with Your Submission.

9. Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County, Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all defenses of lack of personal jurisdiction and forum non-conveniens.

10. Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and supersedes any and all prior agreements, understandings or communications, written or oral, between the parties relating to the subject matter hereof. This Agreement may be assigned by .NET Foundation.

.NET Foundation dedicates this Contribution License Agreement to the public domain according to the Creative Commons CC0 1.

@dotnet-policy-service agree

Remove custom parameter wrapping functionality that duplicatedexisting infrastructure in Features/Core/Portable/Wrapping/SeparatedSyntaxList.- Remove custom parameter wrapping options from CSharpFormattingOptions2- Remove custom parameter wrapping logic from formatting rules- Remove custom parameter wrapping test fileThe existing CSharpParameterWrapper and CSharpArgumentWrapper alreadyprovide comprehensive parameter wrapping with EditorConfig support.
The test file was testing custom parameter wrapping options that were removedin favor of the existing infrastructure in Features/Core/Portable/Wrapping/SeparatedSyntaxList.This resolves build errors with undefined parameter wrapping options.
This commit removes unnecessary whitespace in the IndentBlockFormattingRule, TokenBasedFormattingRule, and WrappingFormattingRule files to improve code readability and maintain consistency across the codebase.
…ing rulesThis commit removes unnecessary whitespace in CSharpFormattingOptions2, IndentBlockFormattingRule, and WrappingFormattingRule files to enhance code readability and maintain consistency across the codebase.
…and WrappingFormattingRuleThis commit cleans up whitespace in the IndentBlockFormattingRule and WrappingFormattingRule files to enhance code readability and maintain consistency across the codebase.
…ouble indentationThe AddCaseSectionIndentBlockOperation method was causing double indentationfor switch case blocks because AddSwitchIndentationOperation already handlesall switch section indentation. Removing the redundant operation fixes theformatting test failures where case blocks were over-indented by 4 spaces.
- Add three new EditorConfig options:  * csharp_parameter_wrapping (do_not_wrap | wrap_long_parameters | wrap_every_parameter)  * csharp_parameter_first_placement (same_line | new_line)  * csharp_parameter_alignment (align_with_first | indent)- Define ParameterWrappingOptionsInternal, ParameterFirstPlacementOptionsInternal,  and ParameterAlignmentOptionsInternal enums- Add EditorConfig parsing and serialization for the new options- Update CSharpSyntaxFormattingOptions to include parameter wrapping properties- Add options to CSharpFormattingOptions2 with proper EditorConfig integrationThis exposes the existing manual parameter wrapping functionality throughEditorConfig for automatic formatting, allowing teams to configure parameterwrapping behavior consistently across their codebase.
- Add TestAddParameterWrappingOptionAsync for csharp_parameter_wrapping- Add TestAddParameterFirstPlacementOptionAsync for csharp_parameter_first_placement- Add TestAddParameterAlignmentOptionAsync for csharp_parameter_alignment- Add TestUpdateParameterWrappingOptionAsync for updating existing options- Add TestAddMultipleParameterWrappingOptionsAsync for multiple options togetherThese tests verify that the new parameter wrapping EditorConfig options can be properly serialized, parsed, and updated through the SettingsUpdateHelper infrastructure.
- Add csharp_binary_expression_wrapping option (do_not_wrap | wrap_long_expressions | wrap_every_operator)- Add BinaryExpressionWrappingOptionsInternal enum for internal representation- Add parsing and serialization functions for EditorConfig integration- Update CSharpSyntaxFormattingOptions to include binary expression wrapping- Add comprehensive EditorConfig tests for binary expression wrapping optionsThis exposes the existing manual binary expression wrapping capabilities as automatic formatting behaviors that can be configured through .editorconfig files, matching the same pattern as parameter wrapping options.
- Add new formatting options to expected output in CSharpEditorConfigGeneratorTests- Update whitespace setting provider test to exclude advanced wrapping options- Fixes CI failures caused by new EditorConfig options being included in output
- Add csharp_parameter_wrapping to VS roaming profile storage- Add csharp_parameter_first_placement to VS roaming profile storage- Add csharp_parameter_alignment to VS roaming profile storageFixes VisualStudioOptionStorageTests failures by ensuring all new formatteroptions are properly registered with Visual Studio's settings persistence.
@dotnet-policy-servicedotnet-policy-servicebot added the Needs API ReviewNeeds to be reviewed by the API review council labelJul 15, 2025
@Andy-Corrigan-98
Copy link
Author

This PR modifies public API files. Please follow the instructions athttps://github.com/dotnet/roslyn/blob/main/docs/contributing/API%20Review%20Process.md for ensuring all public APIs are reviewed before merging.

Made me check myself - took the wrong approach to resolving the last CI issue; will alter to be private options specifically for use in.editorconfig where they don't already map to VS tooling

… API requirements- Remove WithPublicOption() calls from internal parameter wrapping options- Add parameter wrapping options to VS storage test exclusion list- Treat as EditorConfig-only options without public API surfaceThese options (csharp_binary_expression_wrapping, csharp_indent_wrapped_call_chains,csharp_parameter_alignment, csharp_parameter_first_placement, csharp_parameter_wrapping,csharp_wrap_call_chains) are intended for EditorConfig use only and do not requirepublic APIs or Visual Studio storage integration.Fixes VisualStudioOptionStorageTests failures without requiring API review process.
@Andy-Corrigan-98Andy-Corrigan-98force-pushed thefeature/configurable-parameter-wrapping branch from10ff5c1 to638b382CompareJuly 15, 2025 21:56
…tionsRemove csharp_parameter_wrapping, csharp_parameter_first_placement, andcsharp_parameter_alignment from optionsWithoutStorage array since theseoptions now have Visual Studio storage as part of the parameter wrappingfeature implementation.Fixes CI test failures in VisualStudioOptionStorageTests.OptionHasStorageIfNecessary.
…-only- Remove Visual Studio storage registrations for parameter wrapping options- Add parameter wrapping options to test exclusion list for options without storage- Fixes CI test failures by following the established pattern for EditorConfig-only options
@azure-pipelinesAzure Pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JoeRobichJoeRobichJoeRobich left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
Area-IDECommunityThe pull request was submitted by a contributor who is not a Microsoft employee.Needs API ReviewNeeds to be reviewed by the API review councilVSCode
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Wrap parameters or chained method calls should be configurable
3 participants
@Andy-Corrigan-98@CyrusNajmabadi@JoeRobich

[8]ページ先頭

©2009-2025 Movatter.jp