Inspections does not honor settings

I am getting warnings that the name of my Instance fields does not match the rule.

However when I check the rule, it says it should be _lowerCamelCase which matches my code style. (Changing "Enable ‘Inconsistent Naming’ inspection, ‘Enable inspection’ and 'Use auto-detected values does nothing).

There are no settings for 'Instance fields' in my EditorConfig file. (Or any other rules about Naming…)

 

Does anyone know what is going on here? It has worked fine previously (2023)

0
10 comments

Hello Viktor Lindblom,

Could you attach a screenshot of the Code Style Configuration window? You can invoke Show Code Style Configuration action from Search Everywhere to show this window.

0

Hello, here it is:

I turned Autodetection back on from the previous screenshots

0

Thank you for the screenshot. Would you mind expanding the first Global AnalyzerConfig node - does it contain any naming rules?

0

Sure no problem. But I don't think there are any:

0

Thank you for the information. 

Could you check if StyleCop support is enabled in the affected IDE instance? You can find Enable StyleCop support setting under Editor→Code Style

0

Stylecop is on. Turning it off made the errors go away for a few seconds after restarting rider, but probably just due to reanalyzing the files

0

Thank you for the information Viktor Lindblom. Would you be comfortable sharing your .editorconfig with us along with your Rider logs (Help→Collect Logs) so we can investigate this further?

 

You can send us the logs via the Upload Service and leave the Upload ID in this thread.

0

Sure, my upload id is 2024_02_20_z1JvwGQuHZULvZZwdgSmnT, both .editorconfig and logs are supplied

0

@... Not sure if this helps, but adding:
// ReSharper disable once InconsistentNaming
private readonly IMediator _mediator;
 

stops rider from complaining. So is it something with ReSharper maybe?

0

Found the issue, a duplicate [*.cs] tag in the .editorconfig was the error

0

Please sign in to leave a comment.