Website • Docs • Roadmap • Mission • Playground Find and lint complex code patterns effortlessly What is CodeQue?CodeQue is semantic code search engine that understands the code syntax. It matches code structurally which makes it excellent for more complex queries. Query language offers wildcards, partial matching and ignores code formatting. Structural code search is available for JavaScript, TypesScript, HTML, CSS, Python, Lua and more soon. Text code search with handy wildcards is available for every language and covers common regex search use cases. Just paste code snippet to start searching, no installation needed! Integrations CodeQue is available as:
All CodeQue tools work offline hence code never leaves your local environment. Coming soon CodeQue will be soon available as:
🔔 Get notified about updates 🔔 Visual Studio Code Extension 🔮VScode extension aims to make your workflow more efficient. It addresses the problems of standard search by providing multiline support and offers an easy way to add gaps or use wildcards in the query. You don't need to have any Regex knowledge to query complex code patterns. With CodeQue, you can easily navigate and modify your codebase, making your development process faster and more efficient. It will help you with code refactoring, speed up project discovery, and make it easy to find duplicated or similar code patterns. Advanced code search options and todo-like list of accurate search results will streamline your workflow. Watch extension in action in 1 minute (external link) 👇 AboutOne of the main strengths of CodeQue is its easy-to-use query language, but it also offers several additional features that make it a great support tool for your daily work. Features
Example Queries
FeaturesQuery languageThe beauty of CodeQue query language is that the query has to be valid source code. You don't have to learn anything new! Except the fact there are a few types of wildcards.
It matches all identifiers, JSX identifiers, types identifiers, function names and so on.
It matches any statement or expression. Think of it as 'match anything'. There a few quirks there. It's good to have general understanding of how code is represented in AST (Abstract Syntax Tree) for more complex queries. More technically Wildcards in stringsStrings have their's own wildcards
Number wildcard
Here is an example of query which finds all types of logs which includes word
Search modesCodeQue offers the following search modes
The most useful mode is `include`. As the name suggest the matched code has to include the code from query, but it can also contain other statements. It performs structural comparison. Learn more about
Learn more about Sometimes you might want to find the code that matches exactly your query. Here is where Learn more about Last but not least, Learn more about Here is the example of Searching by file importsCool feature of CodeQue is ability to search within files that are directly and indirectly imported by given entry point. CodeQue generates file's dependency tree and search through all nodes. Simply file dependency based search. It's handy for finding whether a given module is used in given part of application or find a code causing a bug when proper stack trace is not available. To get started you can enter the file path manually in search settings. However easier way of searching by file imports is to use option Todo-like results listAbility to manage search results list is very handy for refactoring. You can collapse or remove not relevant results and mark others as done after you make changes. I've very similar UX to Github Pull Request review view. Select to searchAnother handy addition is the possibility to search by code selected in editor, so you don't have to copy-paste the query. It's just faster. After making a selection simply click CodeQue will automatically detect whether select text is valid code and perform search using recently used structural search mode. Otherwise it would fallback to Files list filtersSearch wouldn't be useful without ability to filter files list. You can define glob patters to either include or exclude files from the list. By default CodeQue is not searching in files ignored by Enable the following flags with caution, as they might significantly downgrade search performance for lager projects.
Example files list settings 👇
Case sensitivityYou can choose whether to compare identifier persisting their original case or do case insensitive match. Search errorsSometimes you might encounter some search errors. They will be mostly due to some syntax errors in you source files. You can check search error details in tooltip available after click the error count message 👇 Query examplesCodeQue is general purpose code search tool. The examples list could be endless. Here are some of them for you to get a glimpse of what's possible. Those are relatively simple, you will definitely find some more complex during day to day work.
All usages of
|