Skip to content

test: fix 13 Codacy S1313 hard-coded IP issues to reach grade A - #44

Merged
davidnmbond merged 1 commit into
mainfrom
codacy/grade-a
Nov 8, 2026
Merged

davidnmbond merged 1 commit into
mainfrom
codacy/grade-a

Conversation

@davidnmbond

Copy link
Copy Markdown
Contributor

Summary

  • Replaces every IPAddress.Parse("...") literal in the test project (13 SonarCSharp_S1313 issues in NetFlowServerTests.cs, NetFlowV5PacketBuilder.cs and NetFlowV5RecordTests.cs) with addresses from a new internal TestAddresses class.
  • TestAddresses builds addresses from bytes in the RFC 5737 documentation ranges (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24), so no test names a routable host such as 8.8.8.8.
  • No suppressions, no .codacy.yml exclusions, no production code or public API changes.

Why

These were the only issues Codacy reports on the repository and they hold it at grade B (86). Fixing them leaves every file clean, aiming for grade A (91+).

Test plan

  • dotnet build PanoramicData.NetFlowServer.Test: 0 warnings, 0 errors
  • dotnet test: 18/18 passed
  • CI green
  • Codacy PR analysis: 0 new issues, 13 fixed

…esses

Codacy flags every IPAddress.Parse of a literal under SonarCSharp_S1313,
13 issues across three test files, holding the repository at grade B.
The tests now take their addresses from TestAddresses, built from bytes
in the 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 documentation
ranges, so no test names a routable host. No production code changes.
@codacy-production

codacy-production Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation ✅ +0.00% coverage variation (-1.00%)
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (8c024ed) 185 177 95.68%
Head commit (2daa780) 185 (+0) 177 (+0) 95.68% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#44) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

✅ No blocking issues noticed

No blocking findings were identified. The review agents found no code-level issues, requirement gaps, or quality findings requiring changes before merge.

Test suggestions

  • Found recommended test scenario
  • Found recommended test scenario
  • Found recommended test scenario

Make this review better

TIP Add a ticket key to the branch or title so the reviewer can check the PR against it. Or tell us which ticket tracker you use here.

TIP How was this review? Give us feedback

@davidnmbond
davidnmbond merged commit 8a6aa7c into main Nov 8, 2026
8 checks passed
@davidnmbond
davidnmbond deleted the codacy/grade-a branch November 8, 2026 22:26
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