How to exclude a directory from the code analysis?

只谈情不闲聊 提交于 2019-12-05 18:35:30

That's the correct place to set it up. Please try simply /Migrations/** or /MyProject/Migrations/**. When you go to one of the issues you want to get rid of, you'll see what your "regex" path should start with.

And one more tip: To see result, you have to rebuild the project, run sonar again. And again, until you get it right.

I had to use a different setting.

Instead of Configuration->Settings->Exclusions->Files->Source Files Exclusions I had to use Configuration->Settings->Exclusions->Issues->Ignore Issues on Multiple Criteria.

In this setting, I had to set the RULE KEY PATTERN to *, and I had to set the path wildcard in the FILE PATH PATTERN, **/Migrations/. works perfectly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!