Skip to content

Fix for Useless assignment to local variable#289

Merged
samsmithnz merged 4 commits intomainfrom
finding-autofix-44c2face
Dec 4, 2025
Merged

Fix for Useless assignment to local variable#289
samsmithnz merged 4 commits intomainfrom
finding-autofix-44c2face

Conversation

@samsmithnz
Copy link
Copy Markdown
Collaborator

To fix the issue, simply remove the unused assignment to result in CountPeanutMandMsInANullUnitTest. Specifically, delete the line:

float result = Calculator.CountPeanutMandMs(unit, quantity);

from within the try block. No other changes are necessary, as this assignment does not contribute to the test and its removal does not affect the logical flow or the assertion.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 4, 2025

Pull Request Test Coverage Report for Build 19936007476

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.366%

Totals Coverage Status
Change from base Build 19935998615: 0.0%
Covered Lines: 102
Relevant Lines: 102

💛 - Coveralls

@samsmithnz samsmithnz marked this pull request as ready for review December 4, 2025 16:02
@samsmithnz samsmithnz enabled auto-merge December 4, 2025 16:02
@samsmithnz samsmithnz merged commit 7a2c70d into main Dec 4, 2025
7 checks passed
@samsmithnz samsmithnz deleted the finding-autofix-44c2face branch December 4, 2025 16:25
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.

1 participant