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

Add C# 9 tests for 5 rules #3713

Merged
merged 6 commits into from
Nov 5, 2020
Merged

Conversation

andrei-epure-sonarsource
Copy link
Contributor

Related to #3668

Copy link
Member

Choose a reason for hiding this comment

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

LGTM! Just a few minor comments.

@@ -47,6 +47,15 @@ public class CookieShouldBeHttpOnlyTest
new CookieShouldBeHttpOnly(AnalyzerConfiguration.AlwaysEnabled),
additionalReferences: GetAdditionalReferences_NetCore());

[TestMethod]
[TestCategory("Rule")]
public void CookiesShouldBeHttpOnly_NetCore_CSharp9() =>

Choose a reason for hiding this comment

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

pedantic: this is now just ".Net" :)

@@ -64,6 +64,15 @@ public class CookieShouldBeSecureTest
new CookieShouldBeSecure(AnalyzerConfiguration.AlwaysEnabled),
additionalReferences: GetAdditionalReferences_NetCore());

[TestMethod]
[TestCategory("Rule")]
public void CookiesShouldBeSecure_NetCore_CSharp9() =>

Choose a reason for hiding this comment

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

pedantic: like in previous comment, I would remove the mention of the framework

{
void IsPattern()
{

Choose a reason for hiding this comment

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

pedantic: empty line


void IsNotPattern()
{

Choose a reason for hiding this comment

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

pedantic: empty line

se also in the other methods

Comment on lines 119 to 123
// See https://github.com/dotnet/roslyn/issues/45510
namespace System.Runtime.CompilerServices
{
public class IsExternalInit { }
}

Choose a reason for hiding this comment

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

I think you need to rebase on master and remove this, otherwise this will break the build after merge.

See also the other files.

@sonarcloud
Copy link

sonarcloud bot commented Nov 5, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

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

@sonarcloud
Copy link

sonarcloud bot commented Nov 5, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@andrei-epure-sonarsource andrei-epure-sonarsource merged commit 1906da3 into master Nov 5, 2020
@andrei-epure-sonarsource andrei-epure-sonarsource deleted the andrei/cs9-uts-5 branch November 5, 2020 15:42
Corniel pushed a commit to Corniel/sonar-csharp that referenced this pull request Nov 30, 2020
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