Skip to content

[Feature]: Sonar Cleanups #92

@Malcolmnixon

Description

@Malcolmnixon

Problem Statement

Sonar is reporting numerous issues

Proposed Solution

Fix the following issues:

test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(171): INFO CODE_SMELL [external_roslyn:IDE0028] Collection initialization can be simplified  
test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(240): INFO CODE_SMELL [external_roslyn:IDE0028] Collection initialization can be simplified  
test/DemaConsulting.BuildMark.Tests/MockRepoConnectorTests.cs(150): INFO CODE_SMELL [external_roslyn:CA1860] Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance  
test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(139): INFO CODE_SMELL [external_roslyn:MSTEST0037] Use 'Assert.Contains' instead of 'Assert.IsTrue'  
test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(163): INFO CODE_SMELL [external_roslyn:IDE0028] Collection initialization can be simplified  
test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(198): INFO CODE_SMELL [external_roslyn:MSTEST0037] Use 'Assert.IsGreaterThanOrEqualTo' instead of 'Assert.IsTrue'  
test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(205): INFO CODE_SMELL [external_roslyn:MSTEST0037] Use 'Assert.IsGreaterThanOrEqualTo' instead of 'Assert.IsTrue'  
test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(228): INFO CODE_SMELL [external_roslyn:IDE0028] Collection initialization can be simplified  
test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(234): INFO CODE_SMELL [external_roslyn:IDE0028] Collection initialization can be simplified  
test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(261): INFO CODE_SMELL [external_roslyn:MSTEST0037] Use 'Assert.IsGreaterThanOrEqualTo' instead of 'Assert.IsTrue'  
test/DemaConsulting.BuildMark.Tests/GitHubRepoConnectorTests.cs(265): INFO CODE_SMELL [external_roslyn:MSTEST0037] Use 'Assert.Contains' instead of 'Assert.IsTrue'  
test/DemaConsulting.BuildMark.Tests/RepoConnectors/GitHub/MockGitHubGraphQLHttpMessageHandler.cs(98): INFO CODE_SMELL [external_roslyn:IDE0028] Collection initialization can be simplified  
test/DemaConsulting.BuildMark.Tests/RepoConnectors/GitHub/MockGitHubGraphQLHttpMessageHandler.cs(307): INFO CODE_SMELL [external_roslyn:CA1860] Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance  
test/DemaConsulting.BuildMark.Tests/RepoConnectors/GitHub/MockGitHubGraphQLHttpMessageHandler.cs(367): INFO CODE_SMELL [external_roslyn:CA1860] Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance  
test/DemaConsulting.BuildMark.Tests/RepoConnectors/GitHub/MockableGitHubRepoConnector.cs(38): INFO CODE_SMELL [external_roslyn:IDE0028] Collection initialization can be simplified  

Alternatives Considered

No response

Usage Examples

Benefits

Improved code quality and maintainability.

Priority

Medium - Would improve my workflow

Willingness to Contribute

Yes, I can submit a pull request

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this is not a duplicate
  • I have provided a clear description of the feature
  • I have explained why this feature would be useful

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions