Skip to content

search only file contents for structural search

Administrator requested to merge rvt/robust-structural-search-parsing-pt1 into master

Created by: rvantonder

Structural search should only run on "file" (content) type. Before this change, an error would appear when searching repos for a pattern that is interpreted as regex but isn't, particularly when the structural search pattern is malformed (missing ]):

Screen Shot 2020-02-06 at 5 05 30 PM

This PR results in "No results". There may be ways to make the error more helpful (malformed structural syntax pattern), but I'd like to get this fix in ASAP.

Screen Shot 2020-02-06 at 5 08 39 PM

Testing: verified manually. This happens in the hard-to-test doResults function, so unit test is difficult unless we restructure. This change isn't big enough to warrant an e2e test IMO.

Merge request reports

Loading