Skip to content

Resolve MegaLinter cppcheck failures in eventSelectionQa boolean logic - #18060

Closed
altsybee with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-megalinter-failure
Closed

altsybee with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-megalinter-failure

Conversation

Copilot AI commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

MegaLinter was failing on cppcheck style findings in DPG/Tasks/AOTEvent/eventSelectionQa.cxx, driven by boolean bitwise operations and redundant ternary expressions. This updates the affected expressions to equivalent logical forms expected by static analysis.

  • Root-cause alignment (cppcheck findings)

    • Replaced boolean bitwise composition (&, |, |=) with logical operators (&&, ||) in event acceptance and past-activity aggregation paths.
    • Preserved behavior while removing ambiguous boolean bitwise usage.
  • Expression cleanup

    • Simplified two ternaries with identical branches to constants:
      • isLowFlux ? 40000. : 40000. → 40000.
      • isLowFlux ? 30000. : 30000. → 30000.
  • Representative change

    // before
    bool accepted = 0;
    accepted |= !isINT1period & col.sel7();
    accepted |= isINT1period & sel1;
    
    // after
    bool accepted = (!isINT1period && col.sel7()) || (isINT1period && sel1);

Co-authored-by: altsybee <12641156+altsybee@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job MegaLinter Resolve MegaLinter cppcheck failures in eventSelectionQa boolean logic Sep 25, 2026
Copilot AI requested a review from altsybee September 25, 2026 13:47
@altsybee
altsybee marked this pull request as ready for review September 25, 2026 14:43
@altsybee
altsybee marked this pull request as draft September 25, 2026 14:48
@altsybee altsybee closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants