Skip to content

SCAN4NET-70 Exclude analysis folders from dotCover #2197

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

Merged

Conversation

gregory-paidis-sonarsource
Copy link
Contributor

@gregory-paidis-sonarsource gregory-paidis-sonarsource commented Sep 17, 2024

@gregory-paidis-sonarsource gregory-paidis-sonarsource force-pushed the greg/coverage-exclusions-dotcover-folder branch 2 times, most recently from 7472022 to 67f0389 Compare September 17, 2024 11:52
Base automatically changed from greg/coverage-exclusions-granularity to master September 17, 2024 13:05
@gregory-paidis-sonarsource
Copy link
Contributor Author

This doesn't seem to work as I expected.
Let's talk tomorrow @costin-zaharia-sonarsource

@gregory-paidis-sonarsource gregory-paidis-sonarsource force-pushed the greg/coverage-exclusions-dotcover-folder branch from fc468cd to db639be Compare September 17, 2024 16:58
@gregory-paidis-sonarsource
Copy link
Contributor Author

Nevermind, I figured out my mistake.
It should work now.
I will add an IT to make sure we have this under a real test, but you can still take a look at the implementation and tell me what you think.

@gregory-paidis-sonarsource
Copy link
Contributor Author

I added the IT!
It seems to work.
There seems to be an intermittent issue with some other ITs, I'll rerun it in the morning.

@gregory-paidis-sonarsource gregory-paidis-sonarsource force-pushed the greg/coverage-exclusions-dotcover-folder branch from 7cc79f1 to 2cf6d48 Compare September 18, 2024 08:40
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html class="main">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I run the dotCover tool just like in the documentation and dumped all the files here, so that we don't need to do it on every run of the test.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a readme file that will explain the flow and contain the exact command?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

assertTrue(endStepResult.isSuccess());
assertThat(TestUtils.allIssues(ORCHESTRATOR)).hasSize(1)
.extracting(Issues.Issue::getRule)
.containsOnly("csharpsquid:S2699");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you take out my change with the coverage directory, this test fails because it finds a lot of issues in the css/html/js files of dotCover's directory.

@gregory-paidis-sonarsource gregory-paidis-sonarsource force-pushed the greg/coverage-exclusions-dotcover-folder branch from 9e3e84c to a7d50de Compare September 18, 2024 12:47
Copy link

@@ -0,0 +1,72 @@
# DotCoverExcludedCoverage

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Thanks for adding it!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@costin-zaharia-sonarsource costin-zaharia-sonarsource merged commit 25e3b64 into master Sep 18, 2024
17 checks passed
@costin-zaharia-sonarsource costin-zaharia-sonarsource deleted the greg/coverage-exclusions-dotcover-folder branch September 18, 2024 13:43
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 this pull request may close these issues.

2 participants