mirror of
https://github.com/github/codeql.git
synced 2026-06-26 15:17:06 +02:00
The `@@name` capture marker in `rule!` queries skips the auto-translate prefix for that specific capture, letting the body see the original capture (and thus delay its translation using `ctx.translate` until it becomes convenient). Regular `@name` captures continue to be auto-translated as before. Specifically these are translated _eagerly_, before the main body of the rewrite rule is run. I settled on `@@` as the syntax because it did not add new symbols that the user has to keep track of (it's still a kind of capture), but it's still visually distinct enough that the user should be able to tell that there's something special going on. In principle one could accidentally write one form of capture where the other was intended, but in practice this would result in code that did not compile (because the types would not match).
CodeQL Shared Libraries
This folder contains shared, language-agnostic CodeQL libraries.
Libraries are organized into separate query packs, in order to allow for
individual versioning. For example, the shared static single assignment (SSA)
library exists in the codeql/ssa pack, which can be referenced by adding
dependencies:
codeql/ssa: 0.0.1
to qlpack.yml.
All shared libraries will belong to a codeql/<name> pack, and live in the
namespace codeql.<name>.