Skip to content

Conversation

@smowton
Copy link
Contributor

@smowton smowton commented Sep 25, 2025

No description provided.

@smowton smowton requested a review from a team as a code owner September 25, 2025 14:20
Copilot AI review requested due to automatic review settings September 25, 2025 14:20
@github-actions github-actions bot added the Go label Sep 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the mistyped-exponentiation query in Go to better detect XOR operations that might be mistaken for exponentiation by including constants with likely bitmask values in the detection logic.

  • Adds support for detecting XOR operations involving declared constants that have hexadecimal or octal initializers
  • Updates the test case to include constant declarations with hexadecimal values to verify the enhanced detection

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
go/ql/src/InconsistentCode/MistypedExponentiation.ql Adds helper function to resolve constant initializers and extends bitmask pattern detection to include constants
go/ql/test/query-tests/InconsistentCode/MistypedExponentiation/main.go Adds test case with hexadecimal constants to verify the enhanced query behavior

owen-mc
owen-mc previously approved these changes Sep 25, 2025
Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

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

Worth a change note?

@smowton
Copy link
Contributor Author

smowton commented Sep 25, 2025

@owen-mc done

Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

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

Oh wait, this is a quality query. No change note then. Sorry for misinformation earlier.

Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

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

I realised I could delete the change note myself.

@owen-mc owen-mc added the no-change-note-required This PR does not need a change note label Sep 26, 2025
@owen-mc owen-mc merged commit 18a1075 into github:main Sep 26, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Go no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants