unity-game-engineanalysisjetbrains-iderider

JetBrains Rider exclude Unity projects from solution-wide code analysis


When I launch Rider 2020.3 with my Unity 2020 project the solution-wide code analysis reports 3.5K files as having warnings or errors. This makes the analysis practically useless.

How can I restrict Rider to only analyze my code?

I've tried going into "Settings > Editor > Inspection Settings", however the "Exclude Files and Folders" section doesn't seem to work. When I try to add a path it doesn't show up in the list.

When I open the project in Visual Studio with the ReSharper extension It allows me to exclude folders there, it also correctly loads the .DotSettings file next to the solution while Rider does not.

Any help is much appreciated.


Solution

  • Navigate to the Elements to Skip under Inspection Settings:

    Settings (Ctrl+Alt+S) → Editor → Inspection Settings

    Under File masks, append these three lines:

    This excluded all my non-project specific files from the analysis. Depending on what plugins or assets you use, you might have to include some additional ones.

    enter image description here