`dotnet format` command does not fix code when we use `WarningsNotAsErrors`
- Dominant language
- No language data
- Stars
- 1.9k
- Forks
- 173
- Avg merge
- 10d 13h
- Merged PRs (30d)
- 1
Description
**Version Used**:
.NET SDK 6.0.300
C# 10.0
StyleCop.Analyzers 1.2.0-beta.435
Visual Studio 2022 Ver. 17.2.1
**Steps to Reproduce**:
I think these are two different problems.
1. The rules that are in the .globalconfig only work for Visual Studio
For example, I use the rule `SA1210` only work for Visual Studio too.
1. I have created a console application. Where not sorted alphabetically by namespace.
` using System.Text;
using Newtonsoft.Json;
using Moq;
using System.Linq;
using AutoMapper;`
2. And the rule is added to `.globalconfig` `dotnet_diagnostic.SA1210.severity = warning`
Also added to `build.props` `SA1210`
Inside the studio, everything works and I get warnings about it.

But when using the command `dotnet fornat` , the code is not formatted.
For the command `dotnet format` to work.
I need to move a rule from .globalconfig to .editorconfig
And remove the line `SA1210` from build.props
Then the code is formatted
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.