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

csharp_using_directive_placement = inside_namespace don't warn about using outside namespace #43

Closed
philippedurocher opened this issue Dec 6, 2020 · 11 comments · Fixed by #45
Labels
bug Issues describing a bug or pull requests fixing a bug.

Comments

@philippedurocher
Copy link

version 1.6.1 had csharp_using_directive_placement = inside_namespace:warning

Since version 2.0.0 removed the :warning I dont get the warnings and Quick Action don't suggest to move usings inside namespace

@philippedurocher philippedurocher added the bug Issues describing a bug or pull requests fixing a bug. label Dec 6, 2020
@RehanSaeed
Copy link
Owner

Are you using the latest version of VS? There were breaking changes are called out in #42.

@philippedurocher
Copy link
Author

This is my VS Version (About dialog) Microsoft Visual Studio Professional 2019 Version 16.8.2

@RehanSaeed
Copy link
Owner

I tried it and you're correct.

The EditorConfig VS extension is complaining that csharp_* and dotnet_style_ properties need a severity and others don't. I don't really understand what's going on.

According to dotnet/roslyn#39827 this change should have gone out already.

dotnet/roslyn#48580 suggests that there were further changes to go out in 16.9.

@RehanSaeed
Copy link
Owner

I've requested some clarification in dotnet/roslyn#44201.

@Xeevis
Copy link
Contributor

Xeevis commented Dec 9, 2020

I have same problem with Visual Studio Code using Omnisharp. it had Roslyn updated to 3.8.0 2 days ago and it doesn't take into account any rules missing severity either.

@RehanSaeed
Copy link
Owner

#43 may be the cause of this issue.

@cars10w
Copy link

cars10w commented Dec 9, 2020

Ran into the same thing today.

I have to explicitly set the severity for it to behave correctly:

csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion

Otherwise these settings are not picked up at all.

@RehanSaeed
Copy link
Owner

@cars10w Did fixing #43 fix this issue for you?

@cars10w
Copy link

cars10w commented Dec 9, 2020

@RehanSaeed What fix do you exactly mean?

@Xeevis
Copy link
Contributor

Xeevis commented Dec 9, 2020

I think 2.0.0 breaking changes were released way ahead of their time. Current syntax isn't deprecated yet, the #44201 issue isn't closed, it's just a backlog not even planned for 16.9.

PR Make the ':severity' suffix in editorconfig code style value optional milestoned for 16.9 Preview 2 that released yesterday just makes the current syntax optional.

@RehanSaeed
Copy link
Owner

@Xeevis You may be right. My initial understanding was that 16.8 would bring in the breaking changes. It seems to work too but not for some settings.

I'll get #43 fixed and if that doesn't resolve the issue we should revert PR dotnet/roslyn#44201.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues describing a bug or pull requests fixing a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants