mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Swift: implement python schema
The information that was contained in `schema.yml` is now in `swift/schema.py`, which allows a more integrated IDE experience for writing and navigating it. Another minor change is that `schema.Class` now has a `str` `group` field instead of a `pathlib.Path` `dir` one.
This commit is contained in:
@@ -136,10 +136,10 @@ def test_classes_with_dirs(generate_grouped):
|
||||
cbase = cpp.Class(name="CBase")
|
||||
assert generate_grouped([
|
||||
schema.Class(name="A"),
|
||||
schema.Class(name="B", dir=pathlib.Path("foo")),
|
||||
schema.Class(name="CBase", derived={"C"}, dir=pathlib.Path("bar")),
|
||||
schema.Class(name="C", bases=["CBase"], dir=pathlib.Path("bar")),
|
||||
schema.Class(name="D", dir=pathlib.Path("foo/bar/baz")),
|
||||
schema.Class(name="B", group="foo"),
|
||||
schema.Class(name="CBase", derived={"C"}, group="bar"),
|
||||
schema.Class(name="C", bases=["CBase"], group="bar"),
|
||||
schema.Class(name="D", group="foo/bar/baz"),
|
||||
]) == {
|
||||
".": [cpp.Class(name="A", trap_name="As", final=True)],
|
||||
"foo": [cpp.Class(name="B", trap_name="Bs", final=True)],
|
||||
|
||||
Reference in New Issue
Block a user