-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Document new EditorConfig style rules #28791
Comments
dotnet/roslyn#60546 says that IDE0161 ( Also, a helpful mapping of IDs to editorconfig options is here: https://github.com/dotnet/roslyn/blob/main/src/VisualStudio/Core/Def/CodeCleanup/readme.md |
But that page says "All formatting options have rule ID |
FYI this list might get out of date very easily. Consider |
I'm also planning to have a |
There's a good list of undocumented rules at https://github.com/madskristensen/EditorConfigLanguage/blob/master/src/Schema/EditorConfig.json |
@MisinformedDNA Seems like this list is not fully up to date. Some of those settings are already documented (can be found with Google). But thanks for the list anyway. There are some rules in there which I didn't know about. I only check the "Generate .editorconfig file from settings" feature of Visual Studio and the |
I think we should wait on doc'ing experimental rules. The rest should be documented. |
Seems like there's a bunch of new ones here that should be documented: https://github.com/dotnet/roslyn/blob/35fda5cf56445624cb0837b8b9ddbd9aa8f98b95/src/Analyzers/Core/Analyzers/IDEDiagnosticIds.cs#L172-L182
|
@alexrp IDE1007 should not be documented, and (hopefully) will be removed soon. |
@Youssef1313 Fair enough. Just for posterity, can you clarify what its purpose is/was? |
Consider the following: public class C
{
public Test P { get; }
} There is no type named
Some IDE features (e.g, generate type) are triggered by this compiler diagnostic: However, there are scenarios (incomplete members) where the compiler don't produce So, for the following code: public class C
{
Test
} The compiler only produces So, in short, IDE1007 is produced on already-error scenarios, but helps the IDE to trigger features such as generate type. It'll be removed when the compiler produces binding diagnostics that IDE1007 produces, which I'm working on in dotnet/roslyn#62874. |
I've updated the issue description for Visual Studio 2022 17.3 |
Hi, is there a known description on what the experimental rules do? |
I've updated the issue description for Visual Studio 2022 17.4 @jknaudt21 I think the best "documentation" is the code preview in the VS options window. |
I've updated the issue description for Visual Studio 2022 17.5.2 |
@gewarren Thanks for keeping this issue up-to-date for newly documented rules! |
@gewarren Thanks for keeping this issue up-to-date for newly documented rules! |
@gewarren It looks like everything (except experimental rules) from Visual Studio 2022 17.8 is now documented. Thanks! |
Thanks @cremor. I'll close it now and we can open a new issue for future docs. Thanks for keeping this one up to date! |
The following EditorConfig style rules supported in Visual Studio 2022 17.8 are currently not documented:
dotnet_style_prefer_collection_expression
Note: This setting affects both IDE0028 and IDE0300 (and maybe more). There is already a documentation for IDE0028 at https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0028 but that page mentiones a different setting (
dotnet_style_collection_initializer
) which now seems to have no effect any more. This might be a bug.dotnet_style_allow_statement_immediately_after_block_experimental
dotnet_style_allow_multiple_blank_lines_experimental
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental
csharp_style_allow_blank_lines_between_consecutive_braces_experimental
csharp_style_allow_embedded_statements_on_same_line_experimental
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Associated WorkItem - 45471
The text was updated successfully, but these errors were encountered: