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

Bump test dependencies #7873

Merged
merged 2 commits into from
Sep 5, 2023
Merged

Conversation

pavel-mikula-sonarsource
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource commented Aug 24, 2023

Replaces #7856, #7872, #7613, #7571

Latest SDK fails due to altcover clash: microsoft/vstest#4106

@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@@ -391,7 +391,7 @@ public void Cfg_If_ElseIf()
secondCondition.SuccessorBlocks.Should().BeEquivalentTo(new[] { trueBlockY, exitBlock });
secondCondition.BranchingNode.Kind().Should().Be(SyntaxKind.FalseLiteralExpression);

exitBlock.PredecessorBlocks.Should().BeEquivalentTo(new[] { trueBlockX, trueBlockY, secondCondition });
exitBlock.PredecessorBlocks.Should().BeEquivalentTo(new[] { trueBlockX, trueBlockY, secondCondition }, x => x.IgnoringCyclicReferences());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New version of FluentAssertions has default limits that break the .Parent.Parent.Parent.Parent chain on the syntax

@@ -917,8 +917,7 @@ public void ExplodedGraph_SwitchStatement_UnsupportedPatternKinds(string pattern
}
""";
var context = new ExplodedGraphContext(testInput);
var walk = () => context.WalkWithInstructions(2);
walk.Should().Throw<Exception>().WithMessage("Expected NumberOfExitBlockReached to be 1, but found 0 (difference of -1).");
context.WalkWithExitBlocks(2, 0);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This started failing for wrong reason. This is the method that should have been used

@@ -1,10 +1,10 @@
using System;

file class ClassNotExtended { } // Noncompliant {{File-scoped classes which are not derived in the current file should be marked as 'sealed'.}}
file class ClassNotExtended { } // Noncompliant {{File-scoped classes which are not derived in the current file should be marked as 'sealed'.}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some clean as you code whitespace. The file below is the actual change, because of invalid syntax in the new version

@@ -172,7 +172,7 @@ stages:

- powershell: |
cd analyzers
& dotnet test -f $(FrameworkMoniker) -c $(BuildConfiguration) -l trx /p:AltCover=true,AltCoverForce=true,AltCoverVisibleBranches=true,AltCoverAssemblyFilter='Moq|Humanizer|AltCover',AltCoverPathFilter='SonarAnalyzer\.CFG\\ShimLayer|SonarAnalyzer\.ShimLayer\.CodeGeneration',AltCoverAttributeFilter='ExcludeFromCodeCoverage',AltCoverReport=coverage/coverage.xml
& dotnet test -f $(FrameworkMoniker) -c $(BuildConfiguration) -l trx /p:AltCover=true,AltCoverForce=true,AltCoverVisibleBranches=true,AltCoverAssemblyFilter='Moq|Humanizer|AltCover|Microsoft.VisualStudio.TestPlatform.*|.*Test',AltCoverPathFilter='SonarAnalyzer\.CFG\\ShimLayer|SonarAnalyzer\.ShimLayer\.CodeGeneration',AltCoverAttributeFilter='ExcludeFromCodeCoverage',AltCoverReport=coverage/coverage.xml
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(almost) related change to altcover bump. This will make coverage file smaller, because there's no reason to generate coverage data for TestPlatform assemblies and the test project themselves - the config is now the same as we did on security side

Copy link
Contributor

@csaba-sagi-sonarsource csaba-sagi-sonarsource left a comment

Choose a reason for hiding this comment

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

LGTM!
Please fix the description of the PR as for example #7832 is not replaced by the PR.

@pavel-mikula-sonarsource pavel-mikula-sonarsource merged commit ede622e into master Sep 5, 2023
33 checks passed
@pavel-mikula-sonarsource pavel-mikula-sonarsource deleted the Pavel/BumpDependencies branch September 5, 2023 06:26
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