Skip to content

sonar(S3358): Ternary operators should not be nested [src/Equiv.Frontend.CSharp/, 5 findings] #268

Description

@github-actions

Filed by tools/sonar-triage/sonar-triage.ps1. This issue is the ticket: see docs/adr/0016-sonar-issue-triage.md.

Goal

One part of the rule:csharpsquid:S3358 batch, which is too big for one PR. Clear the
5 findings below, across 2 files under src/Equiv.Frontend.CSharp/. The parent issue
(shown by GitHub above this one) holds the rule-wide decision: follow it, and match the shape
of fix that already-merged parts used.

Findings

Location Rule Message Sonar
src/Equiv.Frontend.CSharp/Execution/ProbeArguments.cs:84 csharpsquid:S3358 Extract this nested ternary operation into an independent statement. open
src/Equiv.Frontend.CSharp/Execution/ProbeArguments.cs:90 csharpsquid:S3358 Extract this nested ternary operation into an independent statement. open
src/Equiv.Frontend.CSharp/Execution/ProbeArguments.cs:91 csharpsquid:S3358 Extract this nested ternary operation into an independent statement. open
src/Equiv.Frontend.CSharp/Execution/ProbeArguments.cs:92 csharpsquid:S3358 Extract this nested ternary operation into an independent statement. open
src/Equiv.Frontend.CSharp/Fingerprinting/BoundSerialiser.cs:303 csharpsquid:S3358 Extract this nested ternary operation into an independent statement. open

Acceptance criteria

  1. Every finding above is either fixed, or added to tools/sonar-triage/policy.jsonc with
    verdict: accept and a reason citing an ADR or a ticket. A finding that no longer
    reproduces on HEAD is called out in the PR body, not silently dropped.
  2. ./build.ps1 -Integration is green.
  3. No #pragma warning disable, no coverage exclusion, no gate lowered.

How to fix

Point a session at this issue and say use equiv-sonar-fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    sonarFiled from the SonarQube Cloud backlogsonar:mediumSonar impact severity: mediumtech-debtQuality debt, not a feature or a bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions