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

SonarLintXmlReader refactoring #6924

Merged
merged 17 commits into from Mar 21, 2023
Merged

SonarLintXmlReader refactoring #6924

merged 17 commits into from Mar 21, 2023

Conversation

mary-georgiou-sonarsource
Copy link
Contributor

Addresses comments from #6870

@mary-georgiou-sonarsource mary-georgiou-sonarsource marked this pull request as draft March 14, 2023 14:02
@github-actions github-actions bot added this to In progress in Best Kanban Mar 14, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource changed the base branch from master to feature/SL-exclusions-inclusions March 14, 2023 14:16
@mary-georgiou-sonarsource mary-georgiou-sonarsource changed the title cleanup (draft title) SonarLintXmlReader refactoring Mar 15, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource marked this pull request as ready for review March 15, 2023 15:52
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Mar 16, 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good! Just one nitpick comment

Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource left a comment

Choose a reason for hiding this comment

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

Kaboom

@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Mar 20, 2023
@github-actions github-actions bot moved this from Review approved to Review in progress in Best Kanban Mar 20, 2023
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-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

@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Mar 20, 2023
Co-authored-by: Pavel Mikula <57188685+pavel-mikula-sonarsource@users.noreply.github.com>
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-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

There are some minor UT improvements to do

@@ -82,6 +82,22 @@ public void SonarLintXmlReader_PropertiesCSharpTrueVBNetFalse_ExpectedValues()
sut.AnalyzeGeneratedCode(LanguageNames.VisualBasic).Should().BeFalse();
}

[TestMethod]
public void SonarLintXmlReader_DuplicatedProperties_DoesNotFail()
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Throwing is asserted via lambdas.

Suggested change
{
public void SonarLintXmlReader_DuplicatedProperties_DoesNotFail() =>
((Action)(() => CreateSonarLintXmlReader("ResourceTests\\SonarLintXml\\Duplicated_Properties\\SonarLint.xml"))).Should().NotThrow();

Copy link
Contributor

Choose a reason for hiding this comment

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

I strongly prefer @"asdf\asdf" over double \\ - this applies everywhere. The \\ is cumbersome to work with, copy paste and use in general.

@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Mar 21, 2023
@sonarcloud
Copy link

sonarcloud bot commented Mar 21, 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 Mar 21, 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 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@mary-georgiou-sonarsource mary-georgiou-sonarsource merged commit 082afb7 into master Mar 21, 2023
23 checks passed
Best Kanban automation moved this from Review approved to Validate Peach Mar 21, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource deleted the mary/cleanup branch March 21, 2023 15:05
@mary-georgiou-sonarsource mary-georgiou-sonarsource moved this from Validate Peach to Done in Best Kanban Apr 17, 2023
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

4 participants