# Editorconfig not obeyed in Blazor/Razor files

**URL:** <https://community.sonarsource.com/t/editorconfig-not-obeyed-in-blazor-razor-files/140677>\
**Category:** Report False-positive / False-negative...\
**Tags:** dotnet, blazor\
**Created:** [May 8, 2025, 1:15pm UTC](https://community.sonarsource.com/t/editorconfig-not-obeyed-in-blazor-razor-files/140677 "2025-05-08T13:15:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjconrad](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@mjconrad](https://community.sonarsource.com/u/mjconrad)\
**Post date:** [May 8, 2025, 1:15pm UTC](https://community.sonarsource.com/t/editorconfig-not-obeyed-in-blazor-razor-files/140677/1 "2025-05-08T13:15:54Z")

</div>

Quick note, I’m very excited to see .razor files getting analyzed now. But this issue is blocking adoption of the newer analyzer.

- What language is this for? C# / Razor
- Which rule? S1125 and S6608 at least. I haven’t directly observed others, but I suspect its a general issue.
- Why do you believe it’s a false-positive/false-negative? Because Editorconfig is suppressing the rule violations for .cs files.
- Are you using: Nuget: SonarAnalyzer.CSharp 10.8.0.113526
- How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
  - A minimal repro is here [GitHub - Siphonophora/Sonar-Razor-Repro](https://github.com/Siphonophora/Sonar-Razor-Repro) all you need is to put code that violates a rule in razor and you will see editorconfig being ignored.

---

<div class="post-metadata">

**Author:** ![denis.troller](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/denis.troller/32/49117_2.png) [@denis.troller](https://community.sonarsource.com/u/denis.troller)\
**Post date:** [May 9, 2025, 11:27am UTC](https://community.sonarsource.com/t/editorconfig-not-obeyed-in-blazor-razor-files/140677/2 "2025-05-09T11:27:26Z")

</div>

Hi, @mjconrad, welcome back to the community!

Thank you for reporting this!  
We are aware of this issue. It is being tracked with a [ticket on our repository](https://github.com/SonarSource/sonar-dotnet/issues/8050).  
Unfortunately I have no information on when we can expect a resolution at this stage.

Denis

---

<div class="post-metadata">

**Author:** ![mjconrad](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@mjconrad](https://community.sonarsource.com/u/mjconrad)\
**Post date:** [May 21, 2025, 1:56pm UTC](https://community.sonarsource.com/t/editorconfig-not-obeyed-in-blazor-razor-files/140677/3 "2025-05-21T13:56:43Z")

</div>

Thanks. I upvoted that issue. This will block us taking updates until this is fixed
