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

Bug: Field comments don't work with tabs. #72966

Open
hamarb123 opened this issue Apr 10, 2024 · 1 comment
Open

Bug: Field comments don't work with tabs. #72966

hamarb123 opened this issue Apr 10, 2024 · 1 comment
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-Formatter Code formatter and/or smart indent
Milestone

Comments

@hamarb123
Copy link

hamarb123 commented Apr 10, 2024

Version Used: VS 17.9.5, roslyn 4.9.0-3.24121.1 (a98c90d); AND VS 17.10.0 Preview 3.0, roslyn 4.10.0-3.24202.15 (cbca41c).

Steps to Reproduce:

  1. Make a c# class library project.
  2. Put this in the .editorconfig for the solution:
[*.cs]
dotnet_diagnostic.IDE0055.severity = error
indent_style = tab
  1. Put this in a c# file:
namespace ClassLibrary1
{
	public enum Class1
	{
		a, //a
		//b,
		c,
	}
}

(make sure it uses tabs, and not spaces)

Diagnostic Id:

IDE0055 fix formatting. (move //b, to align with //a)

Expected Behavior:

No diagnostic.

Actual Behavior:

Error.

Additional information:

See #29482 for the feature request

Also, if you replace the tabs with spaces, and update the .editorconfig appropriately, you get no error (as per the original feature request) - it only occurs with tabs.

This is a blocker for me with enabling proper formatting rules in my projects.

/cc @CyrusNajmabadi who was discussing this with me on discord

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 10, 2024
@hamarb123 hamarb123 changed the title Field comments don't work with tabs. Bug: Field comments don't work with tabs. Apr 10, 2024
@sharwell sharwell added Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-Formatter Code formatter and/or smart indent and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 10, 2024
@sharwell sharwell added this to the Backlog milestone Apr 10, 2024
@sharwell
Copy link
Member

@CyrusNajmabadi I'm not able to find a reference to the pull request(s) where #29482 or #65247 were fixed. Can you help with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-Formatter Code formatter and/or smart indent
Projects
None yet
Development

No branches or pull requests

2 participants