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

Search Expressions? #635

Open
michael-hawker opened this issue Dec 1, 2022 · 2 comments
Open

Search Expressions? #635

michael-hawker opened this issue Dec 1, 2022 · 2 comments

Comments

@michael-hawker
Copy link

Not sure if I've missed it somewhere on the webpage.

Is it possible to do any search expressions?

Things I'd like to do in general with search:

  • Combine expressions with && (and) and || (or)
    • e.g. UWP || WinUI
  • Search with wildcards within terms *
    • e.g. Labs.*.csproj
  • Exclude something !
    • e.g. !TargetFrameworkMoniker*
  • Search on whole words only/exact match
    • e.g. "netstandard2.0"
  • Search under nodes that match the given term >>(?)
    • e.g. MyApp.*.Tests.csproj >> "does not exist"
  • Use RegEx
    • e.g. "regex:[error|warning] 40\d4"

Types of things I'd want to search specifically on:

  • Search on project filename
    • e.g. proj:MyApp.Tests.csproj
  • Other specific types of things like Items, Properties, Imports, Targets, Tasks, Warnings, Errors etc... (not as sure at the moment what these would look like but probably like item:, prop:, target: etc... where it'd only match if the term is found in the string on that line/bucket of that type)

So, ultimately could do something like this:

!TargetFrameworkMoniker* && proj:Toolkit.Labs.*.csproj >> AssemblyAttributes
@KirillOsenkov
Copy link
Owner

Some help for the search is displayed in the watermark:

image

Specifically, project(Toolkit.Labs) under($rar) $additem Reference will find all places where Reference item is added under the ResolveAssemblyReference task in any project that contains the string Toolkit.Labs.

A lot of what you're asking is already available. Boolean && is implicit, so by separating things with a space you're searching for nodes that contain both.

Every node time is available, such as $import, $noimport, $target, $task, etc.

@michael-hawker
Copy link
Author

Thanks @KirillOsenkov, I guess part of the issue is it's hard to reference this when you've already got a search up. 🙂

And I think by default if there's failures it auto-searches for $error right? So, I just didn't remember/know this was here.

Could be handy to have in the wiki or one the website pointed to from the help menu as well so that it can be brought up alongside crafting a search query when results are displayed.

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

No branches or pull requests

2 participants