mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: dbscheme generator
This patch introduces the basic infrastructure of the code generation suite and the `dbscheme` generator. Notice that the checked in `schema.yml` should reflect swift 5.6 but might need some tweaking. Closes https://github.com/github/codeql-c-team/issues/979
This commit is contained in:
@@ -4,6 +4,32 @@ The Swift codeql package is an experimental and unsupported work in progress.
|
||||
|
||||
## Usage
|
||||
|
||||
Run `bazel run //swift:create-extractor-pack`, which will install `swift/extractor-pack`.
|
||||
Run
|
||||
|
||||
```bash
|
||||
bazel run //swift:create-extractor-pack
|
||||
```
|
||||
|
||||
which will install `swift/extractor-pack`.
|
||||
|
||||
Using `--search-path=swift/extractor-pack` will then pick up the Swift extractor. You can also use
|
||||
`--search-path=swift`, as the extractor pack is mentioned in `swift/.codeqlmanifest.json`.
|
||||
|
||||
Notice you can run `bazel run :create-extractor-pack` if you already are in the `swift` directory.
|
||||
|
||||
## Code generation
|
||||
|
||||
Make sure to install the [pip requirements](./codegen/requirements.txt) via
|
||||
|
||||
```bash
|
||||
python3 -m pip install -r codegen/requirements.txt
|
||||
```
|
||||
|
||||
Run
|
||||
|
||||
```bash
|
||||
bazel run //swift/codegen
|
||||
```
|
||||
|
||||
to update generated files. This can be shortened to
|
||||
`bazel run codegen` if you are in the `swift` directory.
|
||||
|
||||
Reference in New Issue
Block a user