roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

Rolsynator Analyze does not find configured errors in .EditorConfig file

Open ajinkyabansod opened this issue 4 years ago • 5 comments
trafficstars

Product and Version Used: Visual Studio 2019 with .Net5

Steps to Reproduce: Open .EditorConfig file set severity for some as error. For e.g. IDE0065.

Actual Behavior:

It does not recognize this as an error. Hence Fix command does not work either

Expected Behavior:

Identifies everything configured in .EditorConfig file and should also provide the fix for them.

ajinkyabansod avatar Sep 15 '21 06:09 ajinkyabansod

IDE0065 is a rule from Microsoft not from Roslynator.

josefpihrt avatar Sep 15 '21 18:09 josefpihrt

So there is no possibility that , we set some errors in EditorConfig and get them fixed with "Roslynator Fix" command?

ajinkyabansod avatar Sep 16 '21 05:09 ajinkyabansod

These IDE**** rules are contained in assemblies that are loaded by the IDE.

If you want to use these assemblies outside IDE you have to add these assemblies. Use the option --analyzer-assemblies.

I my computer assemblies are located at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\ManagedLanguages\VBCSharp\LanguageServices but on your computer the location may be different depending on your settings.

 --analyzer-assemblies
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\ManagedLanguages\VBCSharp\LanguageServices\Microsoft.CodeAnalysis.CSharp.EditorFeatures.dll"
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\ManagedLanguages\VBCSharp\LanguageServices\Microsoft.CodeAnalysis.CSharp.Features.dll"
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\ManagedLanguages\VBCSharp\LanguageServices\Microsoft.CodeAnalysis.EditorFeatures.dll"
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\ManagedLanguages\VBCSharp\LanguageServices\Microsoft.CodeAnalysis.Features.dll"

josefpihrt avatar Sep 16 '21 18:09 josefpihrt

@JosefPihrt Thank you, that was exactly the answer I was looking for the other day 😅

tiesmaster avatar Sep 17 '21 09:09 tiesmaster

@tiesmaster I'm glad it helped!

josefpihrt avatar Sep 17 '21 16:09 josefpihrt