Skip to content
Snippets Groups Projects

search: disable parentheses heuristic for recognized operators

Merged Administrator requested to merge rvt/disable-heuristic-on-op-substr into master

Created by: rvantonder

We want a pattern like (() main func()) to be treated literally according to the heuristic that recognizes this input. This same heuristic will interpret (() or main()) literally, but in this case, the subexpression is a valid or-expression that we should parse rather than apply this heuristic.

This PR fixes the above, but really it is a stopgap because as I'm introducing more complex testing cases, I'm realizing that this heuristic doesn't really cut it for the behaviors we care about, and I will rework this logic soon.

Merge request reports

Approval is optional

Merged by avatar (Jul 24, 2025 1:25pm UTC)

Merge details

  • Changes merged into master with 5d93e014.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: codecov[bot]

    Codecov Report

    Merging #11128 into master will not change coverage. The diff coverage is 100.00%.

    @@           Coverage Diff           @@
    ##           master   #11128   +/-   ##
    =======================================
      Coverage   46.39%   46.39%           
    =======================================
      Files        1367     1367           
      Lines       77136    77136           
      Branches     6553     6606   +53     
    =======================================
      Hits        35786    35786           
      Misses      37951    37951           
      Partials     3399     3399           
    Flag Coverage Δ
    #go 50.47% <100.00%> (ø)
    #storybook 6.88% <ø> (ø)
    #typescript 35.84% <ø> (ø)
    #unit 46.18% <100.00%> (ø)
    Impacted Files Coverage Δ
    internal/search/query/parser.go 91.94% <100.00%> (ø)
Please register or sign in to reply
Loading