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

Roslyn style rules csharp_space_between_parentheses don't have false value in doc #37130

Open
FrediKats opened this issue Sep 15, 2023 · 4 comments · Fixed by #38715 · May be fixed by #44623
Open

Roslyn style rules csharp_space_between_parentheses don't have false value in doc #37130

FrediKats opened this issue Sep 15, 2023 · 4 comments · Fixed by #38715 · May be fixed by #44623
Assignees
Labels
dotnet-fundamentals/svc in-pr This issue will be closed (fixed) by an active pull request. 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@FrediKats
Copy link
Contributor

FrediKats commented Sep 15, 2023

Type of issue

Other (describe below)

Description

Issue description

Roslyn rule option csharp_space_between_parentheses don't have value false in list of available values.

I checked these two related threads:

Page URL

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options

Content source URL

https://github.com/dotnet/docs/blob/live/docs/fundamentals/code-analysis/style-rules/csharp-formatting-options.md

Document Version Independent Id

8811a4cf-6a12-89ca-ac2b-4ee16c7c59b9

Article author

@gewarren

Metadata

  • cf6d446d-5426-c75f-1210-4f998a4c6eba
  • Service: dotnet-fundamentals

Associated WorkItem - 355902

@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Sep 15, 2023
@gewarren gewarren self-assigned this Oct 26, 2023
@gewarren gewarren added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Dec 4, 2023
@github-actions github-actions bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Dec 4, 2023
@gewarren gewarren moved this from 🔖 Ready to 🏗 In progress in dotnet/docs December 2023 sprint Dec 9, 2023
@gewarren gewarren moved this from 🏗 In progress to 👀 In review in dotnet/docs December 2023 sprint Dec 9, 2023
@gewarren gewarren moved this from 👀 In review to ✅ Done in dotnet/docs December 2023 sprint Dec 13, 2023
@gewarren gewarren closed this as completed Apr 2, 2024
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Apr 2, 2024
@jtmedley
Copy link

jtmedley commented Sep 2, 2024

Please reopen:

This section specifies twice about how any other value (including false) disables the setting. It does this first in the option table with the description "Never add spaces between parentheses" for "false (or any other value)".

Then immediately after the table: "If you omit this rule or use a value other than control_flow_statements, expressions, or type_casts, the setting is not applied."

I think the intent for a false value is for the spaces between parentheses to be ignored, meaning new spaces are not added, but neither are existing spaces removed. The "Never add spaces" description and the "setting is not applied" statement below it might technically mean the same thing, but the wording is ambiguous and potentially redundant.

But both descriptions don't address the underlying issue: the documentation does not specify a default option value. It appears to be the only formatting option that doesn't have one (37 option names, 36 default values). It seems like the default could be false or maybe ignore, but shouldn't it at least be something?

@gewarren gewarren reopened this Sep 4, 2024
@gewarren gewarren added the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Jan 10, 2025
@dotnet-policy-service dotnet-policy-service bot removed the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Jan 10, 2025
@dotnetrepoman dotnetrepoman bot added the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Jan 24, 2025
@dotnet-policy-service dotnet-policy-service bot removed the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Jan 24, 2025
@gewarren gewarren moved this from 🔖 Ready to 🏗 In progress in dotnet/docs January 2025 sprint project Jan 25, 2025
@gewarren
Copy link
Contributor

@tmat Thank you, but I'm trying to figure out what the default value is.

@gewarren gewarren moved this from 🏗 In progress to 👀 In review in dotnet/docs January 2025 sprint project Jan 30, 2025
@dotnetrepoman dotnetrepoman bot added the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Jan 30, 2025
@dotnet-policy-service dotnet-policy-service bot removed the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Jan 30, 2025
@dotnet-policy-service dotnet-policy-service bot added the in-pr This issue will be closed (fixed) by an active pull request. label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fundamentals/svc in-pr This issue will be closed (fixed) by an active pull request. 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: 👀 In review
Status: Done
7 participants