Skip to content
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

Analyze Test code #980

Closed
pavel-mikula-sonarsource opened this issue Mar 23, 2021 · 7 comments · Fixed by #986
Closed

Analyze Test code #980

pavel-mikula-sonarsource opened this issue Mar 23, 2021 · 7 comments · Fixed by #986
Assignees
Milestone

Comments

@pavel-mikula-sonarsource
Copy link
Contributor

pavel-mikula-sonarsource commented Mar 23, 2021

As part of MMF-2297, we need to start analyzing test code.

We'll introduce new scanner parameter sonar.dotnet.excludeTestProjects=true to opt-out from this (for performance reasons).

@andrei-epure-sonarsource
Copy link
Contributor

For some reason this issue is not linked by GH to #986 (the PR)

@pavel-mikula-sonarsource pavel-mikula-sonarsource linked a pull request Apr 7, 2021 that will close this issue
@pavel-mikula-sonarsource
Copy link
Contributor Author

Link added manually

@ghaouim
Copy link

ghaouim commented Apr 21, 2021

the sonar.dotnet.excludeTestProjects property is implemented?
can we specify it at the analysis parameters level?

Thanks.

@pavel-mikula-sonarsource
Copy link
Contributor Author

Hi @ghaouim, yes, the property is implemented, but it's not visible in this repo, as it's a parameter of Scanner for .NET.
You can add /d:sonar.dotnet.excludeTestProjects=true to your begin step arguments (or the other suitable format, depending on your build setup).

You need scanner version 5.2 for this.

@ghaouim
Copy link

ghaouim commented Apr 21, 2021

Thank you for your prompt reply.

we are using azure devops and used SonarScanner for MSBuild version is 5.2

image

I have tried setting the option this way but did not worked:

image

did I missed something?

@pavel-mikula-sonarsource
Copy link
Contributor Author

Your setup looks correct. Please create a new topic in https://community.sonarsource.com as that's the correct place for this problem (this repo is not related to scanner).

@savbace
Copy link

savbace commented Jul 8, 2021

@ghaouim Did you manage to resolve the issue with Azure DevOps task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants