-
Notifications
You must be signed in to change notification settings - Fork 224
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
.razor: statement count, consider only mapped statements #7981
Merged
cristian-ambrosini-sonarsource
merged 3 commits into
master
from
cristian/razor-statement-count
Sep 8, 2023
Merged
.razor: statement count, consider only mapped statements #7981
cristian-ambrosini-sonarsource
merged 3 commits into
master
from
cristian/razor-statement-count
Sep 8, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cristian-ambrosini-sonarsource
requested a review
from costin-zaharia-sonarsource
September 7, 2023 12:37
github-actions
bot
assigned cristian-ambrosini-sonarsource and costin-zaharia-sonarsource and unassigned cristian-ambrosini-sonarsource
Sep 7, 2023
4 tasks
cristian-ambrosini-sonarsource
moved this from In progress
to Review in progress
in Best Kanban
Sep 8, 2023
4 tasks
@@ -78,7 +78,7 @@ public void VerifyMetrics_Razor() | |||
metrics.FunctionCount.Should().Be(2); | |||
metrics.NoSonarComment.Should().BeEmpty(); | |||
metrics.NonBlankComment.Should().BeEquivalentTo(new[] {13, 20, 21, 26, 27, 30, 31, 34, 35, 36, 8}); | |||
metrics.StatementCount.Should().Be(31); | |||
metrics.StatementCount.Should().Be(12); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to understand what are the statements:
1. <p>Current count: @currentCount</p> <!-- code line-->
2. @currentCount <!-- code line-->
3. <p>Current time: @(DateTime.Now)</p> <!-- code line-->
4. @for (var i = 0; i < 5; i++) // code line
5. @i
6. void RenderName(string name) // code line
7. @name
8. RenderName("Mahatma Gandhi");
9. RenderName("Martin Luther King, Jr.");
10. if (true)
11. for (var i = 0; i < 5; i++)
12. @i
costin-zaharia-sonarsource
approved these changes
Sep 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
costin-zaharia-sonarsource
assigned cristian-ambrosini-sonarsource and unassigned costin-zaharia-sonarsource
Sep 8, 2023
costin-zaharia-sonarsource
moved this from Review in progress
to Review approved
in Best Kanban
Sep 8, 2023
cristian-ambrosini-sonarsource
force-pushed
the
cristian/razor-statement-count
branch
from
September 8, 2023 10:57
5db8006
to
337e0ce
Compare
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
cristian-ambrosini-sonarsource
deleted the
cristian/razor-statement-count
branch
September 8, 2023 11:28
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #7936.