X Tutup
The Wayback Machine - https://web.archive.org/web/20260108034207/https://github.com/github/codeql/pull/7661
Skip to content

Conversation

@shati-patel
Copy link
Contributor

@shati-patel shati-patel commented Jan 19, 2022

We've introduced two new commands in github/vscode-codeql#1076 which will make it easier to work with CodeQL packs from within VS Code. You can download packs and install pack dependencies. I think this is a suitable place to document the new commands, but other suggestions are welcome! 📝

The linked PR also has some demo GIFs for reference 😊

No real rush to get this reviewed/merged, since the commands should be fairly self-explanatory. Just whenever the next CLI release happens!

@shati-patel shati-patel marked this pull request as ready for review January 19, 2022 16:47
@shati-patel shati-patel added the ready-for-doc-review This PR requires and is ready for review from the GitHub docs team. label Jan 19, 2022
adityasharad
adityasharad previously approved these changes Jan 20, 2022
Copy link
Collaborator

@adityasharad adityasharad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff. Couple of minor suggestions.

felicitymay
felicitymay previously approved these changes Jan 21, 2022
Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shati-patel - thank you so much for updating the documentation for these new commands. 💖

I've made various suggestions for possible improvements, but these are based just on viewing your gifs as I haven't been able to use the commands. Feel free to ignore any that don't make sense.

I think this change should be merged into the CLI 2.7.6 branch, assuming that we'll want to update the docs to include this change when we release 2.7.6? Otherwise it won't be published until a new CLI branch is taken from main and that CLI version released.

Viewing CodeQL packs and their dependencies in Visual Studio Code
-----------------------------------------------------------------
Whether you have used the CodeQL CLI to download a CodeQL pack that someone else has created, or created your own, you can open the ``qlpack.yml`` file in the root of a CodeQL pack directory in Visual Studio Code and view the dependencies section to see what libraries the pack depends on.
To download a CodeQL pack that someone else has created, run the **CodeQL: Download Packs** command from the Command Palette.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having watched the gif (thanks), I wonder if we need to mention that you'll need to enter the full pack name and give an example. This may be obvious to the user but I wanted to check.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - potentially, this deserves its own heading, even though it will be a very short section, to make it easier for users to find when they scan this article.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've added a bit of clarification and an example in 1462565

Haven't added a new heading just yet, since we don't expect too many users to use this command at the moment. Once we've added a way to directly run queries from a downloaded pack, we can make this more discoverable! (Currently, they'd have to find the queries in their package cache, which isn't ideal...)


Installing dependencies for CodeQL packs in Visual Studio Code
--------------------------------------------------------------
To install dependencies for a CodeQL pack in your Visual Studio Code workspace, run the **CodeQL: Install Pack Dependencies** command from the Command Palette and select the packs you want to install dependencies for.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the demo gif, this is called CodeQL: Install Packs - I assume that the name changed since you recorded that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. sorry about that - the GIF is slightly outdated! We decided to change the command name to be more explicit 😺

Co-authored-by: Felicity Chapman <felicitymay@github.com>
@shati-patel
Copy link
Contributor Author

@shati-patel - thank you so much for updating the documentation for these new commands. 💖

I've made various suggestions for possible improvements, but these are based just on viewing your gifs as I haven't been able to use the commands. Feel free to ignore any that don't make sense.

I think this change should be merged into the CLI 2.7.6 branch, assuming that we'll want to update the docs to include this change when we release 2.7.6? Otherwise it won't be published until a new CLI branch is taken from main and that CLI version released.

Thanks for the review! ✨ 🎉

This feature hasn't been released yet in the extension so merging into main is okay, and the docs changes can be published during the next CLI release cycle 😊

Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarifications and assurance about the target branch. This LGTM 🚀

@shati-patel shati-patel merged commit 1c711e0 into github:main Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation ready-for-doc-review This PR requires and is ready for review from the GitHub docs team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup