-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roslyn analyzers are being run in excluded directories #4718
Comments
You can add an .editorconfig in your projects root folder which declares the folders you do not want to analyze as generated code. root = true
# Prevent analyzers from running in these directories
[Assets/ProCamera2D/**.cs]
generated_code = true |
@JoeRobich Sadly, it doesn't work for me. Dependencies' code is still being analyzed, and adding the
So the wildcard clearly gets picked up but since the dependencies' project options are placed in corresponding .csproj files instead of code they're ignored and it additional noise is created. A bit of context - my project is a multi-folder workspace, and dependencies' .csproj files are referenced in the .sln located in the root of the first folder in the workspace, since they're part of a build process. Could we please re-open this issue if it could be possibly resolved? |
@RaZeR-RBI Sorry about that instead of |
That helps with hiding the warnings in the 'Problems' tab (which I've done before by specifying a filter), but the analyzers are still being run in projects located in excluded folders. To paraphrase, the UI side of the issue can be fixed by using this option, but the performance side is, sadly, isn't solved. |
@RaZeR-RBI I noticed this too. 😞 Maybe it's a good idea to create a new issue asking to fix this? I will upvote. By the way I'm using this: [*.cs]
generated_code = true
dotnet_analyzer_diagnostic.severity = none |
I think that there's a lot of issues already and we shouldn't add more burden for maintainers and other awesome people who contribute to this extension and infrastructure. It'd be easier to re-open this one IMO. Good to know that I'm not the only one affected by this though. |
That's not what I meant - this issue is basically a "question", and the solution we were given addresses our problem - in theory. But in practice it contains a bug, like you said:
If we leave the bug documented in this question issue it will get lost in the noise. Unless you change the title and they reopen the issue. I feel your pain, I have this problem all day long! |
Oh, now I get it. I've edited the title and added a quote to the first post of this issue. Thanks for the idea, now we just need someone to come and re-open it 😉 |
EDIT: Issue title edited to reflect the following:
Apologies if it has been asked before or I'm reporting it to a wrong repository.
My current project uses a big amount of dependencies supplied in a source form instead of NuGet packages.
Solution load in VS Code takes several minutes and a lot of CPU power because of Roslyn analyzers trying to find issues in linked subprojects.
Is there a way to skip analysis in specific folders and/or projects?
They still should be loaded for Intellisense to work (I can't exclude them), but I'm not particularly interested of possible issues they may contain.
Thank you very much for your hard work.
The text was updated successfully, but these errors were encountered: