Ability to search all JavaScript files, regardless of extension

RESOLVED FIXED

Status

Webtools
DXR
--
enhancement
RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: MattN, Assigned: new_one)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: mxr-parity easy, URL)

There should be a way to search on javascript files.  On MXR this was accomplished with the "in files matching" pattern by specifying "\.js" (available from the dropdown).  This would search .js and .jsm files.

I don't see a way to do this with DXR at the moment.  I tried different regexp/wildcard characters with "ext:" and "path:" with no success. I also tried two "ext:" operators with no success.

Some ideas for implementation:
* "ext:javascript" becomes an alias for for .js* files 
* if "ext:" is specified multiple times then the extension should match ANY specified (instead of ALL like the current behaviour which won't do anything useful AFAICT)

Comment 1

6 years ago
I think we should just make it possible to search on path regexes, and then maybe build some sort of a UI on top of that for the common file types (js, c++, .h, etc.)
Summary: Ability to search all JavaScript files → Ability to search all JavaScript files, regardless of extension
Whiteboard: mxr-parity → mxr-parity easy
(Assignee)

Updated

3 years ago
Assignee: nobody → peter.elmers

Comment 2

3 years ago
Commits pushed to es at https://github.com/mozilla/dxr

https://github.com/mozilla/dxr/commit/08577986ab5bff107674317986b8ce301f0f9e69
Fix bug 770998, ability to search all javascript files.

Implement a field `union_only` on the Filter class, which tells
query construction that the filter should always be `or` with
other filters of the same name.

https://github.com/mozilla/dxr/commit/31d4b18de327a71e27a9a7ab472c287aff3c066e
Merge support for union_only filters, fixing bug 770998.

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.