How to disable typo checking in generated code?

On page https://www.jetbrains.com/help/rider/2025.1/Reference__Options__Code_Inspection__Generated_Code.html?keymap=Visual%20Studio%202022 it is written about regions marked as generated code:

"For these items, JetBrains Rider runs only those code inspections that check code for compiler errors and warnings."

I have a generated class and I added it in Editor > Inspection Settings > Generated Code. First, I added the directory name to "Generated files and directories" and it didn't work, I mean the typos in class or property names are still underlined as typos in the editor. They also appear in the "Problems" panel. Then I added the class name to "Generated file masks", and it didn't work either.

I'd like the inspector to behave exactly as documented, i.e. report only compiler errors or warnings. So it should not report e.g. typos, or warnings about insecure "http" links. How to do it?

0
1 comment

Hello bea,

Thank you for reporting the issue, I have created a corresponding record on our bug tracker: RIDER-123551 Unable to skip code inspection for generated code The issue is handled by a dedicated developer there. Please upvote it to indicate your interest and subscribe to further status updates.

While waiting for the fix, you may consider adding the folder in “Elements to skip” under Settings | Editor | Inspection Settings. This can disable code analysis for specific files as well. 

Let me know if you have any further questions. Have a good day!

Regards,

Tom

 

0

Please sign in to leave a comment.