Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for parenthesized parameters in frontend query parser #11688

Merged
merged 3 commits into from Jun 24, 2020

Conversation

lguychard
Copy link
Contributor

Fixes #11655

Adds naive parsing of opening & closing parentheses (no grouping / paren matching), to avoid showing squiggles on queries like r:a (f:b and c), where we previously interpreted (f:b as a single literal and suggested quoting it because it contained a colon.

cc @rvantonder

image

Fixes #11655

Adds naive parsing of opening & closing parentheses (no grouping / paren matching), to avoid showing squiggles on queries like `r:a (f:b and c)`, where we previously  interpreted `(f:b` as a single literal and suggested quoting it because it contained a colon.
@lguychard lguychard requested a review from a team June 24, 2020 08:38
Copy link
Contributor

@rvantonder rvantonder left a comment

Choose a reason for hiding this comment

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

Stamping. I was surprised at the 400LOC but then saw it's mostly test data :P Thank you so much.

@lguychard
Copy link
Contributor Author

Yes, the actual diff is very small 🙂

@codecov
Copy link

codecov bot commented Jun 24, 2020

Codecov Report

Merging #11688 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #11688      +/-   ##
==========================================
+ Coverage   47.53%   47.54%   +0.01%     
==========================================
  Files        1402     1402              
  Lines       79484    79492       +8     
  Branches     6717     6765      +48     
==========================================
+ Hits        37782    37795      +13     
+ Misses      38127    38123       -4     
+ Partials     3575     3574       -1     
Flag Coverage Δ
#go 51.73% <ø> (+<0.01%) ⬆️
#storybook 10.15% <36.84%> (+0.03%) ⬆️
#typescript 36.45% <100.00%> (+0.03%) ⬆️
#unit 47.14% <100.00%> (+0.01%) ⬆️
Impacted Files Coverage Δ
shared/src/search/parser/parser.ts 93.10% <100.00%> (+1.53%) ⬆️
shared/src/search/parser/tokens.ts 100.00% <100.00%> (ø)
.../internal/codeintel/resolvers/graphql/locations.go 80.18% <0.00%> (+1.88%) ⬆️
shared/src/search/parser/diagnostics.ts 93.75% <0.00%> (+12.50%) ⬆️

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.

smartsearch query parser squiggles parenthesized parameters in web app
3 participants