Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 5.88 KB

File metadata and controls

59 lines (46 loc) · 5.88 KB
description Summary and links to CLI tool resource prompts used in CodeQL development

CLI Resources Reference

This document summarizes and links to the files in this repository that provide "resources" (i.e. static descriptions) of CLI tools that are pre-installed for workspaces created from this repository. These CLI resource prompts are intended for use by GitHub Copilot (or other agentic LLM) in aid of various tasks in the CodeQL development lifecycle.

Summary of Pre-Installed CLI Tools

  • codeql - The primary, low-level CLI tool for working with individual CodeQL databases, packs, queries, and tests.
  • qlt - A higher-level CLI tool that is useful for tasks such as:
    • Installing different versions of the codeql CLI;
    • Performing development tasks for multiple CodeQL packs, queries, and/or tests;
    • Creating the directories and files required for fully setting up a new query along with its packs and tests.

codeql CLI Tool Resources

The codeql CLI has many subcommands -- we will not use all of them. Just pick the subcommands from the list below according to your needs.

QLT CLI Tool Resources

The qlt (CodeQL Development Toolkit) CLI is primarily used for creating the scaffolding for a new query and its packs (if not already created) and unit test setup. For most iterative ql development tasks, the codeql CLI is usually a better choice as the qlt CLI is intended for CI/CD workflows that operate on all the CodeQL queries for some base directory and/or langauge and/or pack. As such, you should only run qlt subcommands (other than qlt query generate new-query) if you are really extra sure that you want to perform operations that affect much more than just one query, pack, or test.

Commonly Used `qlt Subcommands

  • qlt query generate new-query - Generate the scaffolding for a new CodeQL query, including directories and files for (src & test) packs, the query itself, and unit testing of the query.

Rarely Used qlt Subcommands