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 UTs to test Razor Expressions locations #9224

Merged
merged 8 commits into from
Apr 30, 2024

Conversation

CristianAmbrosini
Copy link
Contributor

No description provided.

@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Apr 30, 2024
Copy link
Contributor

@Tim-Pohlmann Tim-Pohlmann left a comment

Choose a reason for hiding this comment

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

Looks good, just two code smells left.

@@ -227,7 +227,7 @@ public void Verify_UnchangedFiles(string unchangedFileName, bool expectedProtobu
orderedSymbols[0].FilePath.Should().EndWith("_Imports.razor");
orderedSymbols[1].FilePath.Should().EndWith("Razor.razor");

VerifyReferences(orderedSymbols[1].Reference, 9, 13, 4, 6, 20); // currentCount
VerifyReferences(orderedSymbols[1].Reference, 9, 13, 4, 6, 20, 48); // currentCount
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the T0010 violation in line 223 by renaming symbol to x.

@@ -352,6 +357,10 @@ private VerifierBuilder CreateBuilder(ProjectType projectType, params string[] f
.Should().BeEquivalentTo(assertedDeclarationLineReferences);
}

private static void VerifyReferencesColumns(IReadOnlyList<SymbolReferenceInfo.Types.SymbolReference> symbolReference, int declarationLine, int startLine, int endLine, int startOffset, int endOffset) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

This violates S103 and should be

Suggested change
private static void VerifyReferencesColumns(IReadOnlyList<SymbolReferenceInfo.Types.SymbolReference> symbolReference, int declarationLine, int startLine, int endLine, int startOffset, int endOffset) =>
private static void VerifyReferencesColumns(IReadOnlyList<SymbolReferenceInfo.Types.SymbolReference> symbolReference,
int declarationLine,
int startLine,
int endLine,
int startOffset,
int endOffset) =>

@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Apr 30, 2024
@CristianAmbrosini CristianAmbrosini enabled auto-merge (squash) April 30, 2024 14:25
Copy link

sonarcloud bot commented Apr 30, 2024

Quality Gate Passed Quality Gate passed for 'Sonar .NET Java Plugin'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Apr 30, 2024

Quality Gate Passed Quality Gate passed for 'SonarAnalyzer for .NET'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@CristianAmbrosini CristianAmbrosini merged commit 9de1e67 into master Apr 30, 2024
26 checks passed
Best Kanban automation moved this from Review approved to Validate Peach Apr 30, 2024
@CristianAmbrosini CristianAmbrosini deleted the cristian/explicit-razor-expressions branch April 30, 2024 14:50
@CristianAmbrosini CristianAmbrosini moved this from Validate Peach to Done in Best Kanban May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Best Kanban
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants