Skip to content

Commit 96bce2a

Browse files
committed
mrva docs update
1 parent dcd254a commit 96bce2a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,32 @@ For example, if you want to continue analyzing a set of repositories that had re
153153
154154
You can then insert the ``new-repo-list`` of repositories into your list of custom repository lists for easy access in the Variant Analysis Repositories panel.
155155

156+
Using code search to add repositories to a custom list
157+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158+
159+
You can use code search directly in the CodeQL extension on VSCode to add a subset of repositories from GitHub.com to a custom list. Note that this feature uses the legacy code search via the code search API. For more information on the syntax to use, see "`Searching code (legacy) <https://docs.github.com/en/search-github/searching-on-github/searching-code>`__."
160+
161+
For example, to add all repositories in the `rails` organization on GitHub, you can search `org:rails`.
162+
163+
Custom lists can contain a maximum of 1000 repositories, so at most only the first 1000 repositories returned from your search will be added to your list.
164+
165+
#. In the Variant Analysis Repositories panel, choose the list that you want to add repositories to. You can create a new list or choose an existing list that already contains repositories.
166+
167+
#. Right-click on the list you have chosen and then click **Add repositories with GitHub Code Search**.
168+
169+
#. In the search bar, select a language for your search from the choices in the dropdown.
170+
171+
.. image:: ../images/codeql-for-visual-studio-code/variant-analysis-code-search-language.png
172+
:alt: Screenshot of the search bar for using code search to add repositories to a custom list. The search bar asks you to choose a language for your search and has a dropdown list of languages to choose from.
173+
174+
#. Type the search query that you want to use and press **Enter**.
175+
176+
#. You will see a box in the lower right of VSCode with the text "Searching for repositories...". If you click **Cancel**, no repositories will be added to your list.
177+
178+
#. Once complete, you will see the resulting repositories appear in the dropdown under your custom list in the Variant Analysis Repositories panel.
179+
180+
It is possible that some of the resulting repositories do not have CodeQL databases or are not accessible. When you run an analysis on the list, the results view will show you which repositories could not be analyzed.
181+
156182
Troubleshooting variant analysis
157183
--------------------------------
158184

44.5 KB
Loading

0 commit comments

Comments
 (0)