mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
There was an issue in case multiple inheritance from classes with children was involved, where indexes would overlap. The generated code structure has been reshuffled a bit, with `Impl::getImmediateChildOf<Class>` predicates giving 0-based children for a given class, including those coming from bases, and the final `Impl::getImmediateChild` disjuncting the above on final classes only. This removes the need of `getMaximumChildrenIndex<Class>`, and also removes the code scanning alerts. Also, comments were fixed addressing the review.
Warning
The Swift codeql package is an experimental and unsupported work in progress.
Usage
First ensure you have Bazel installed, for example with
brew install bazelisk
then from the ql directory run
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=., as the extractor pack is mentioned in the root codeql-workspace.yml.
Notice you can run bazel run :create-extractor-pack if you already are in the swift directory.
Code generation
Run
bazel run //swift/codegen
to update generated files. This can be shortened to
bazel run codegen if you are in the swift directory.