cg-code-graph 0.10.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cg_code_graph-0.10.1.dist-info/METADATA +678 -0
- cg_code_graph-0.10.1.dist-info/RECORD +174 -0
- cg_code_graph-0.10.1.dist-info/WHEEL +5 -0
- cg_code_graph-0.10.1.dist-info/entry_points.txt +3 -0
- cg_code_graph-0.10.1.dist-info/licenses/LICENSE +21 -0
- cg_code_graph-0.10.1.dist-info/top_level.txt +1 -0
- codegraph/__init__.py +2 -0
- codegraph/aitools.py +129 -0
- codegraph/apps.py +76 -0
- codegraph/blindspots.py +428 -0
- codegraph/bridges.py +1701 -0
- codegraph/cli.py +725 -0
- codegraph/concepts.py +362 -0
- codegraph/config.py +559 -0
- codegraph/core/__init__.py +0 -0
- codegraph/core/cache.py +375 -0
- codegraph/core/detect.py +80 -0
- codegraph/core/extractors.py +187 -0
- codegraph/core/fsutil.py +61 -0
- codegraph/core/generated.py +575 -0
- codegraph/core/model.py +174 -0
- codegraph/core/paths.py +175 -0
- codegraph/core/plugin.py +160 -0
- codegraph/core/store.py +80 -0
- codegraph/core/syntax_errors.py +132 -0
- codegraph/coverage.py +928 -0
- codegraph/doctor.py +453 -0
- codegraph/external.py +613 -0
- codegraph/indexer.py +336 -0
- codegraph/link.py +434 -0
- codegraph/lint_async.py +524 -0
- codegraph/mcp_server.py +1303 -0
- codegraph/parity.py +473 -0
- codegraph/parity_structure.py +307 -0
- codegraph/payload.py +321 -0
- codegraph/plans.py +1285 -0
- codegraph/platform_scan.py +643 -0
- codegraph/platforms.py +1369 -0
- codegraph/plugins/__init__.py +0 -0
- codegraph/plugins/cfamily/__init__.py +0 -0
- codegraph/plugins/cfamily/plugin.py +930 -0
- codegraph/plugins/cfamily/syntax.py +881 -0
- codegraph/plugins/dart/__init__.py +0 -0
- codegraph/plugins/dart/bridges.py +345 -0
- codegraph/plugins/dart/extractor/bin/extract.dart +717 -0
- codegraph/plugins/dart/extractor/pubspec.lock +149 -0
- codegraph/plugins/dart/extractor/pubspec.yaml +7 -0
- codegraph/plugins/dart/http.py +904 -0
- codegraph/plugins/dart/models.py +308 -0
- codegraph/plugins/dart/plugin.py +625 -0
- codegraph/plugins/dart/program.py +907 -0
- codegraph/plugins/django/__init__.py +0 -0
- codegraph/plugins/django/extras.py +378 -0
- codegraph/plugins/django/models.py +508 -0
- codegraph/plugins/django/plugin.py +728 -0
- codegraph/plugins/django/schemas.py +339 -0
- codegraph/plugins/django/shapes.py +216 -0
- codegraph/plugins/django/urls.py +603 -0
- codegraph/plugins/express/__init__.py +0 -0
- codegraph/plugins/express/plugin.py +428 -0
- codegraph/plugins/flutter/__init__.py +0 -0
- codegraph/plugins/flutter/plugin.py +538 -0
- codegraph/plugins/kotlin/__init__.py +0 -0
- codegraph/plugins/kotlin/exact.py +457 -0
- codegraph/plugins/kotlin/plugin.py +1961 -0
- codegraph/plugins/kotlin/reparse.py +234 -0
- codegraph/plugins/laravel/__init__.py +0 -0
- codegraph/plugins/laravel/broadcast.py +351 -0
- codegraph/plugins/laravel/plugin.py +863 -0
- codegraph/plugins/laravel/tests.py +262 -0
- codegraph/plugins/laravel/values.py +728 -0
- codegraph/plugins/native/__init__.py +0 -0
- codegraph/plugins/native/gates.py +286 -0
- codegraph/plugins/native/runner.py +183 -0
- codegraph/plugins/native/scipread.py +194 -0
- codegraph/plugins/native/ts.py +54 -0
- codegraph/plugins/nest/__init__.py +0 -0
- codegraph/plugins/nest/plugin.py +654 -0
- codegraph/plugins/nextjs/__init__.py +0 -0
- codegraph/plugins/nextjs/plugin.py +336 -0
- codegraph/plugins/nuxt/__init__.py +0 -0
- codegraph/plugins/nuxt/plugin.py +308 -0
- codegraph/plugins/php/__init__.py +0 -0
- codegraph/plugins/php/extractor/composer.json +5 -0
- codegraph/plugins/php/extractor/composer.lock +76 -0
- codegraph/plugins/php/extractor/extract.php +743 -0
- codegraph/plugins/php/gating.py +573 -0
- codegraph/plugins/php/plugin.py +668 -0
- codegraph/plugins/php/strings.py +197 -0
- codegraph/plugins/python/__init__.py +0 -0
- codegraph/plugins/python/aitools.py +664 -0
- codegraph/plugins/python/external.py +245 -0
- codegraph/plugins/python/fields.py +107 -0
- codegraph/plugins/python/plugin.py +1733 -0
- codegraph/plugins/python/refs.py +485 -0
- codegraph/plugins/python/roots.py +412 -0
- codegraph/plugins/python/socketio.py +210 -0
- codegraph/plugins/python/subproc.py +864 -0
- codegraph/plugins/python/tests.py +1040 -0
- codegraph/plugins/python/values.py +179 -0
- codegraph/plugins/pyweb/__init__.py +0 -0
- codegraph/plugins/pyweb/plugin.py +1334 -0
- codegraph/plugins/pyweb/values.py +68 -0
- codegraph/plugins/rust/__init__.py +0 -0
- codegraph/plugins/rust/cargo.py +226 -0
- codegraph/plugins/rust/plugin.py +980 -0
- codegraph/plugins/rust/syntax.py +678 -0
- codegraph/plugins/scip/__init__.py +0 -0
- codegraph/plugins/scip/importer.py +129 -0
- codegraph/plugins/scip/scip.proto +962 -0
- codegraph/plugins/scip/scip_pb2.py +97 -0
- codegraph/plugins/stubs/__init__.py +0 -0
- codegraph/plugins/stubs/plugins.py +38 -0
- codegraph/plugins/swift/__init__.py +0 -0
- codegraph/plugins/swift/baseurl.py +109 -0
- codegraph/plugins/swift/exact.py +415 -0
- codegraph/plugins/swift/indexstore.py +209 -0
- codegraph/plugins/swift/packages.py +174 -0
- codegraph/plugins/swift/plugin.py +2890 -0
- codegraph/plugins/ts/__init__.py +0 -0
- codegraph/plugins/ts/baseurl.py +185 -0
- codegraph/plugins/ts/extractor/extract.mjs +2652 -0
- codegraph/plugins/ts/extractor/fw.mjs +685 -0
- codegraph/plugins/ts/extractor/package-lock.json +205 -0
- codegraph/plugins/ts/extractor/package.json +9 -0
- codegraph/plugins/ts/plugin.py +480 -0
- codegraph/plugins/tsweb/__init__.py +0 -0
- codegraph/plugins/tsweb/common.py +290 -0
- codegraph/plugins/tsweb/data.py +276 -0
- codegraph/presets/__init__.py +146 -0
- codegraph/presets/c_cpp.yaml +9 -0
- codegraph/presets/common.yaml +66 -0
- codegraph/presets/dart.yaml +9 -0
- codegraph/presets/django-ninja.yaml +15 -0
- codegraph/presets/django.yaml +25 -0
- codegraph/presets/djangorestframework.yaml +17 -0
- codegraph/presets/express.yaml +17 -0
- codegraph/presets/kotlin.yaml +11 -0
- codegraph/presets/laravel.yaml +40 -0
- codegraph/presets/nest.yaml +11 -0
- codegraph/presets/nextjs.yaml +15 -0
- codegraph/presets/nuxt.yaml +9 -0
- codegraph/presets/php.yaml +5 -0
- codegraph/presets/python.yaml +10 -0
- codegraph/presets/rust.yaml +5 -0
- codegraph/presets/swift.yaml +10 -0
- codegraph/presets/typescript.yaml +13 -0
- codegraph/process_runs.py +328 -0
- codegraph/protocols/__init__.py +299 -0
- codegraph/protocols/builtin.py +67 -0
- codegraph/protocols/matchers.py +144 -0
- codegraph/protocols/view.py +334 -0
- codegraph/query.py +2089 -0
- codegraph/realtime.py +260 -0
- codegraph/roundtrip.py +346 -0
- codegraph/routes.py +442 -0
- codegraph/starters.py +218 -0
- codegraph/tests_index.py +117 -0
- codegraph/viz/__init__.py +0 -0
- codegraph/viz/graph.py +369 -0
- codegraph/viz/server.py +198 -0
- codegraph/viz/static/app.css +148 -0
- codegraph/viz/static/app.js +1082 -0
- codegraph/viz/static/index.html +81 -0
- codegraph/viz/static/layered.js +237 -0
- codegraph/viz/static/vendor/VERSIONS.txt +4 -0
- codegraph/viz/static/vendor/cose-base.js +3214 -0
- codegraph/viz/static/vendor/cytoscape-fcose.js +1549 -0
- codegraph/viz/static/vendor/cytoscape.min.js +31 -0
- codegraph/viz/static/vendor/layout-base.js +5230 -0
- codegraph/viz/tools/package-lock.json +303 -0
- codegraph/viz/tools/package.json +7 -0
- codegraph/viz/tools/shoot.mjs +165 -0
- codegraph/xcode.py +251 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: scip.proto
|
|
5
|
+
# Protobuf Python Version: 7.35.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
35,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'scip.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nscip.proto\x12\x04scip\"\x7f\n\x05Index\x12 \n\x08metadata\x18\x01 \x01(\x0b\x32\x0e.scip.Metadata\x12!\n\tdocuments\x18\x02 \x03(\x0b\x32\x0e.scip.Document\x12\x31\n\x10\x65xternal_symbols\x18\x03 \x03(\x0b\x32\x17.scip.SymbolInformation\"\x9f\x01\n\x08Metadata\x12&\n\x07version\x18\x01 \x01(\x0e\x32\x15.scip.ProtocolVersion\x12!\n\ttool_info\x18\x02 \x01(\x0b\x32\x0e.scip.ToolInfo\x12\x14\n\x0cproject_root\x18\x03 \x01(\t\x12\x32\n\x16text_document_encoding\x18\x04 \x01(\x0e\x32\x12.scip.TextEncoding\"<\n\x08ToolInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x11\n\targuments\x18\x03 \x03(\t\"\xc5\x01\n\x08\x44ocument\x12\x10\n\x08language\x18\x04 \x01(\t\x12\x15\n\rrelative_path\x18\x01 \x01(\t\x12%\n\x0boccurrences\x18\x02 \x03(\x0b\x32\x10.scip.Occurrence\x12(\n\x07symbols\x18\x03 \x03(\x0b\x32\x17.scip.SymbolInformation\x12\x0c\n\x04text\x18\x05 \x01(\t\x12\x31\n\x11position_encoding\x18\x06 \x01(\x0e\x32\x16.scip.PositionEncoding\"_\n\x06Symbol\x12\x0e\n\x06scheme\x18\x01 \x01(\t\x12\x1e\n\x07package\x18\x02 \x01(\x0b\x32\r.scip.Package\x12%\n\x0b\x64\x65scriptors\x18\x03 \x03(\x0b\x32\x10.scip.Descriptor\"9\n\x07Package\x12\x0f\n\x07manager\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\"\x82\x02\n\nDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rdisambiguator\x18\x02 \x01(\t\x12\'\n\x06suffix\x18\x03 \x01(\x0e\x32\x17.scip.Descriptor.Suffix\"\xa5\x01\n\x06Suffix\x12\x15\n\x11UnspecifiedSuffix\x10\x00\x12\r\n\tNamespace\x10\x01\x12\x0f\n\x07Package\x10\x01\x1a\x02\x08\x01\x12\x08\n\x04Type\x10\x02\x12\x08\n\x04Term\x10\x03\x12\n\n\x06Method\x10\x04\x12\x11\n\rTypeParameter\x10\x05\x12\r\n\tParameter\x10\x06\x12\x08\n\x04Meta\x10\x07\x12\t\n\x05Local\x10\x08\x12\t\n\x05Macro\x10\t\x1a\x02\x10\x01\"d\n\tSignature\x12\x10\n\x08language\x18\x04 \x01(\t\x12\x0c\n\x04text\x18\x05 \x01(\t\x12%\n\x0boccurrences\x18\x02 \x03(\x0b\x32\x10.scip.OccurrenceJ\x04\x08\x01\x10\x02J\x04\x08\x03\x10\x04J\x04\x08\x06\x10\x07\"\xf1\x0b\n\x11SymbolInformation\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x15\n\rdocumentation\x18\x03 \x03(\t\x12)\n\rrelationships\x18\x04 \x03(\x0b\x32\x12.scip.Relationship\x12*\n\x04kind\x18\x05 \x01(\x0e\x32\x1c.scip.SymbolInformation.Kind\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x30\n\x17signature_documentation\x18\x07 \x01(\x0b\x32\x0f.scip.Signature\x12\x18\n\x10\x65nclosing_symbol\x18\x08 \x01(\t\"\xfb\t\n\x04Kind\x12\x13\n\x0fUnspecifiedKind\x10\x00\x12\x12\n\x0e\x41\x62stractMethod\x10\x42\x12\x0c\n\x08\x41\x63\x63\x65ssor\x10H\x12\t\n\x05\x41rray\x10\x01\x12\r\n\tAssertion\x10\x02\x12\x12\n\x0e\x41ssociatedType\x10\x03\x12\r\n\tAttribute\x10\x04\x12\t\n\x05\x41xiom\x10\x05\x12\x0b\n\x07\x42oolean\x10\x06\x12\t\n\x05\x43lass\x10\x07\x12\x0b\n\x07\x43oncept\x10V\x12\x0c\n\x08\x43onstant\x10\x08\x12\x0f\n\x0b\x43onstructor\x10\t\x12\x0c\n\x08\x43ontract\x10>\x12\x0e\n\nDataFamily\x10\n\x12\x0c\n\x08\x44\x65legate\x10I\x12\x08\n\x04\x45num\x10\x0b\x12\x0e\n\nEnumMember\x10\x0c\x12\t\n\x05\x45rror\x10?\x12\t\n\x05\x45vent\x10\r\x12\r\n\tExtension\x10T\x12\x08\n\x04\x46\x61\x63t\x10\x0e\x12\t\n\x05\x46ield\x10\x0f\x12\x08\n\x04\x46ile\x10\x10\x12\x0c\n\x08\x46unction\x10\x11\x12\n\n\x06Getter\x10\x12\x12\x0b\n\x07Grammar\x10\x13\x12\x0c\n\x08Instance\x10\x14\x12\r\n\tInterface\x10\x15\x12\x07\n\x03Key\x10\x16\x12\x08\n\x04Lang\x10\x17\x12\t\n\x05Lemma\x10\x18\x12\x0b\n\x07Library\x10@\x12\t\n\x05Macro\x10\x19\x12\n\n\x06Method\x10\x1a\x12\x0f\n\x0bMethodAlias\x10J\x12\x12\n\x0eMethodReceiver\x10\x1b\x12\x17\n\x13MethodSpecification\x10\x43\x12\x0b\n\x07Message\x10\x1c\x12\t\n\x05Mixin\x10U\x12\x0c\n\x08Modifier\x10\x41\x12\n\n\x06Module\x10\x1d\x12\r\n\tNamespace\x10\x1e\x12\x08\n\x04Null\x10\x1f\x12\n\n\x06Number\x10 \x12\n\n\x06Object\x10!\x12\x0c\n\x08Operator\x10\"\x12\x0b\n\x07Package\x10#\x12\x11\n\rPackageObject\x10$\x12\r\n\tParameter\x10%\x12\x12\n\x0eParameterLabel\x10&\x12\x0b\n\x07Pattern\x10\'\x12\r\n\tPredicate\x10(\x12\x0c\n\x08Property\x10)\x12\x0c\n\x08Protocol\x10*\x12\x12\n\x0eProtocolMethod\x10\x44\x12\x15\n\x11PureVirtualMethod\x10\x45\x12\x0f\n\x0bQuasiquoter\x10+\x12\x11\n\rSelfParameter\x10,\x12\n\n\x06Setter\x10-\x12\r\n\tSignature\x10.\x12\x12\n\x0eSingletonClass\x10K\x12\x13\n\x0fSingletonMethod\x10L\x12\x14\n\x10StaticDataMember\x10M\x12\x0f\n\x0bStaticEvent\x10N\x12\x0f\n\x0bStaticField\x10O\x12\x10\n\x0cStaticMethod\x10P\x12\x12\n\x0eStaticProperty\x10Q\x12\x12\n\x0eStaticVariable\x10R\x12\n\n\x06String\x10\x30\x12\n\n\x06Struct\x10\x31\x12\r\n\tSubscript\x10/\x12\n\n\x06Tactic\x10\x32\x12\x0b\n\x07Theorem\x10\x33\x12\x11\n\rThisParameter\x10\x34\x12\t\n\x05Trait\x10\x35\x12\x0f\n\x0bTraitMethod\x10\x46\x12\x08\n\x04Type\x10\x36\x12\r\n\tTypeAlias\x10\x37\x12\r\n\tTypeClass\x10\x38\x12\x13\n\x0fTypeClassMethod\x10G\x12\x0e\n\nTypeFamily\x10\x39\x12\x11\n\rTypeParameter\x10:\x12\t\n\x05Union\x10;\x12\t\n\x05Value\x10<\x12\x0c\n\x08Variable\x10=\"\x82\x01\n\x0cRelationship\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x14\n\x0cis_reference\x18\x02 \x01(\x08\x12\x19\n\x11is_implementation\x18\x03 \x01(\x08\x12\x1a\n\x12is_type_definition\x18\x04 \x01(\x08\x12\x15\n\ris_definition\x18\x05 \x01(\x08\"O\n\x0fSingleLineRange\x12\x0c\n\x04line\x18\x01 \x01(\x05\x12\x17\n\x0fstart_character\x18\x02 \x01(\x05\x12\x15\n\rend_character\x18\x03 \x01(\x05\"f\n\x0eMultiLineRange\x12\x12\n\nstart_line\x18\x01 \x01(\x05\x12\x17\n\x0fstart_character\x18\x02 \x01(\x05\x12\x10\n\x08\x65nd_line\x18\x03 \x01(\x05\x12\x15\n\rend_character\x18\x04 \x01(\x05\"\xd8\x03\n\nOccurrence\x12\x11\n\x05range\x18\x01 \x03(\x05\x42\x02\x18\x01\x12\x32\n\x11single_line_range\x18\x08 \x01(\x0b\x32\x15.scip.SingleLineRangeH\x00\x12\x30\n\x10multi_line_range\x18\t \x01(\x0b\x32\x14.scip.MultiLineRangeH\x00\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x14\n\x0csymbol_roles\x18\x03 \x01(\x05\x12\x1e\n\x16override_documentation\x18\x04 \x03(\t\x12%\n\x0bsyntax_kind\x18\x05 \x01(\x0e\x32\x10.scip.SyntaxKind\x12%\n\x0b\x64iagnostics\x18\x06 \x03(\x0b\x32\x10.scip.Diagnostic\x12\x1b\n\x0f\x65nclosing_range\x18\x07 \x03(\x05\x42\x02\x18\x01\x12<\n\x1bsingle_line_enclosing_range\x18\n \x01(\x0b\x32\x15.scip.SingleLineRangeH\x01\x12:\n\x1amulti_line_enclosing_range\x18\x0b \x01(\x0b\x32\x14.scip.MultiLineRangeH\x01\x42\r\n\x0btyped_rangeB\x17\n\x15typed_enclosing_range\"\x80\x01\n\nDiagnostic\x12 \n\x08severity\x18\x01 \x01(\x0e\x32\x0e.scip.Severity\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x0e\n\x06source\x18\x04 \x01(\t\x12!\n\x04tags\x18\x05 \x03(\x0e\x32\x13.scip.DiagnosticTag*1\n\x0fProtocolVersion\x12\x1e\n\x1aUnspecifiedProtocolVersion\x10\x00*@\n\x0cTextEncoding\x12\x1b\n\x17UnspecifiedTextEncoding\x10\x00\x12\x08\n\x04UTF8\x10\x01\x12\t\n\x05UTF16\x10\x02*\xa4\x01\n\x10PositionEncoding\x12\x1f\n\x1bUnspecifiedPositionEncoding\x10\x00\x12#\n\x1fUTF8CodeUnitOffsetFromLineStart\x10\x01\x12$\n UTF16CodeUnitOffsetFromLineStart\x10\x02\x12$\n UTF32CodeUnitOffsetFromLineStart\x10\x03*\x94\x01\n\nSymbolRole\x12\x19\n\x15UnspecifiedSymbolRole\x10\x00\x12\x0e\n\nDefinition\x10\x01\x12\n\n\x06Import\x10\x02\x12\x0f\n\x0bWriteAccess\x10\x04\x12\x0e\n\nReadAccess\x10\x08\x12\r\n\tGenerated\x10\x10\x12\x08\n\x04Test\x10 \x12\x15\n\x11\x46orwardDefinition\x10@*\xea\x06\n\nSyntaxKind\x12\x19\n\x15UnspecifiedSyntaxKind\x10\x00\x12\x0b\n\x07\x43omment\x10\x01\x12\x18\n\x14PunctuationDelimiter\x10\x02\x12\x16\n\x12PunctuationBracket\x10\x03\x12\x0b\n\x07Keyword\x10\x04\x12\x19\n\x11IdentifierKeyword\x10\x04\x1a\x02\x08\x01\x12\x16\n\x12IdentifierOperator\x10\x05\x12\x0e\n\nIdentifier\x10\x06\x12\x15\n\x11IdentifierBuiltin\x10\x07\x12\x12\n\x0eIdentifierNull\x10\x08\x12\x16\n\x12IdentifierConstant\x10\t\x12\x1b\n\x17IdentifierMutableGlobal\x10\n\x12\x17\n\x13IdentifierParameter\x10\x0b\x12\x13\n\x0fIdentifierLocal\x10\x0c\x12\x16\n\x12IdentifierShadowed\x10\r\x12\x17\n\x13IdentifierNamespace\x10\x0e\x12\x18\n\x10IdentifierModule\x10\x0e\x1a\x02\x08\x01\x12\x16\n\x12IdentifierFunction\x10\x0f\x12 \n\x1cIdentifierFunctionDefinition\x10\x10\x12\x13\n\x0fIdentifierMacro\x10\x11\x12\x1d\n\x19IdentifierMacroDefinition\x10\x12\x12\x12\n\x0eIdentifierType\x10\x13\x12\x19\n\x15IdentifierBuiltinType\x10\x14\x12\x17\n\x13IdentifierAttribute\x10\x15\x12\x0f\n\x0bRegexEscape\x10\x16\x12\x11\n\rRegexRepeated\x10\x17\x12\x11\n\rRegexWildcard\x10\x18\x12\x12\n\x0eRegexDelimiter\x10\x19\x12\r\n\tRegexJoin\x10\x1a\x12\x11\n\rStringLiteral\x10\x1b\x12\x17\n\x13StringLiteralEscape\x10\x1c\x12\x18\n\x14StringLiteralSpecial\x10\x1d\x12\x14\n\x10StringLiteralKey\x10\x1e\x12\x14\n\x10\x43haracterLiteral\x10\x1f\x12\x12\n\x0eNumericLiteral\x10 \x12\x12\n\x0e\x42ooleanLiteral\x10!\x12\x07\n\x03Tag\x10\"\x12\x10\n\x0cTagAttribute\x10#\x12\x10\n\x0cTagDelimiter\x10$\x1a\x02\x10\x01*V\n\x08Severity\x12\x17\n\x13UnspecifiedSeverity\x10\x00\x12\t\n\x05\x45rror\x10\x01\x12\x0b\n\x07Warning\x10\x02\x12\x0f\n\x0bInformation\x10\x03\x12\x08\n\x04Hint\x10\x04*N\n\rDiagnosticTag\x12\x1c\n\x18UnspecifiedDiagnosticTag\x10\x00\x12\x0f\n\x0bUnnecessary\x10\x01\x12\x0e\n\nDeprecated\x10\x02*\xa5\n\n\x08Language\x12\x17\n\x13UnspecifiedLanguage\x10\x00\x12\x08\n\x04\x41\x42\x41P\x10<\x12\x08\n\x04\x41pex\x10`\x12\x07\n\x03\x41PL\x10\x31\x12\x07\n\x03\x41\x64\x61\x10\'\x12\x08\n\x04\x41gda\x10-\x12\x0c\n\x08\x41sciiDoc\x10V\x12\x0c\n\x08\x41ssembly\x10:\x12\x07\n\x03\x41wk\x10\x42\x12\x07\n\x03\x42\x61t\x10\x44\x12\n\n\x06\x42ibTeX\x10Q\x12\x05\n\x01\x43\x10\"\x12\t\n\x05\x43OBOL\x10;\x12\x07\n\x03\x43PP\x10#\x12\x07\n\x03\x43SS\x10\x1a\x12\n\n\x06\x43Sharp\x10\x01\x12\x0b\n\x07\x43lojure\x10\x08\x12\x10\n\x0c\x43offeescript\x10\x15\x12\x0e\n\nCommonLisp\x10\t\x12\x07\n\x03\x43oq\x10/\x12\x08\n\x04\x43UDA\x10\x61\x12\x08\n\x04\x44\x61rt\x10\x03\x12\n\n\x06\x44\x65lphi\x10\x39\x12\x08\n\x04\x44iff\x10X\x12\x0e\n\nDockerfile\x10P\x12\n\n\x06\x44yalog\x10\x32\x12\n\n\x06\x45lixir\x10\x11\x12\n\n\x06\x45rlang\x10\x12\x12\n\n\x06\x46Sharp\x10*\x12\x08\n\x04\x46ish\x10\x41\x12\x08\n\x04\x46low\x10\x18\x12\x0b\n\x07\x46ortran\x10\x38\x12\x0e\n\nGit_Commit\x10[\x12\x0e\n\nGit_Config\x10Y\x12\x0e\n\nGit_Rebase\x10\\\x12\x06\n\x02Go\x10!\x12\x0b\n\x07GraphQL\x10\x62\x12\n\n\x06Groovy\x10\x07\x12\x08\n\x04HTML\x10\x1e\x12\x08\n\x04Hack\x10\x14\x12\x0e\n\nHandlebars\x10Z\x12\x0b\n\x07Haskell\x10,\x12\t\n\x05Idris\x10.\x12\x07\n\x03Ini\x10H\x12\x05\n\x01J\x10\x33\x12\x08\n\x04JSON\x10K\x12\x08\n\x04Java\x10\x06\x12\x0e\n\nJavaScript\x10\x16\x12\x13\n\x0fJavaScriptReact\x10]\x12\x0b\n\x07Jsonnet\x10L\x12\t\n\x05Julia\x10\x37\x12\x0c\n\x08Justfile\x10m\x12\n\n\x06Kotlin\x10\x04\x12\t\n\x05LaTeX\x10S\x12\x08\n\x04Lean\x10\x30\x12\x08\n\x04Less\x10\x1b\x12\x07\n\x03Lua\x10\x0c\x12\x08\n\x04Luau\x10l\x12\x0c\n\x08Makefile\x10O\x12\x0c\n\x08Markdown\x10T\x12\n\n\x06Matlab\x10\x34\x12\n\n\x06Nickel\x10n\x12\x07\n\x03Nix\x10M\x12\t\n\x05OCaml\x10)\x12\x0f\n\x0bObjective_C\x10$\x12\x11\n\rObjective_CPP\x10%\x12\x08\n\x04Odin\x10o\x12\n\n\x06Pascal\x10\x63\x12\x07\n\x03PHP\x10\x13\x12\t\n\x05PLSQL\x10\x46\x12\x08\n\x04Perl\x10\r\x12\x0e\n\nPowerShell\x10\x43\x12\n\n\x06Prolog\x10G\x12\x0c\n\x08Protobuf\x10\x64\x12\n\n\x06Python\x10\x0f\x12\x05\n\x01R\x10\x36\x12\n\n\x06Racket\x10\x0b\x12\x08\n\x04Raku\x10\x0e\x12\t\n\x05Razor\x10>\x12\t\n\x05Repro\x10\x66\x12\x08\n\x04ReST\x10U\x12\x08\n\x04Ruby\x10\x10\x12\x08\n\x04Rust\x10(\x12\x07\n\x03SAS\x10=\x12\x08\n\x04SCSS\x10\x1d\x12\x07\n\x03SML\x10+\x12\x07\n\x03SQL\x10\x45\x12\x08\n\x04Sass\x10\x1c\x12\t\n\x05Scala\x10\x05\x12\n\n\x06Scheme\x10\n\x12\x0f\n\x0bShellScript\x10@\x12\x0b\n\x07Skylark\x10N\x12\t\n\x05Slang\x10k\x12\x0c\n\x08Solidity\x10_\x12\n\n\x06Svelte\x10j\x12\t\n\x05Swift\x10\x02\x12\x07\n\x03Tcl\x10\x65\x12\x08\n\x04TOML\x10I\x12\x07\n\x03TeX\x10R\x12\n\n\x06Thrift\x10g\x12\x0e\n\nTypeScript\x10\x17\x12\x13\n\x0fTypeScriptReact\x10^\x12\x0b\n\x07Verilog\x10h\x12\x08\n\x04VHDL\x10i\x12\x0f\n\x0bVisualBasic\x10?\x12\x07\n\x03Vue\x10\x19\x12\x0b\n\x07Wolfram\x10\x35\x12\x07\n\x03XML\x10\x1f\x12\x07\n\x03XSL\x10 \x12\x08\n\x04YAML\x10J\x12\x07\n\x03Zig\x10&BN\n\x12org.scip_code.scipB\tScipProtoP\x01Z+github.com/scip-code/scip/bindings/go/scip/b\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scip_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\022org.scip_code.scipB\tScipProtoP\001Z+github.com/scip-code/scip/bindings/go/scip/'
|
|
35
|
+
_globals['_SYNTAXKIND']._loaded_options = None
|
|
36
|
+
_globals['_SYNTAXKIND']._serialized_options = b'\020\001'
|
|
37
|
+
_globals['_SYNTAXKIND'].values_by_name["IdentifierKeyword"]._loaded_options = None
|
|
38
|
+
_globals['_SYNTAXKIND'].values_by_name["IdentifierKeyword"]._serialized_options = b'\010\001'
|
|
39
|
+
_globals['_SYNTAXKIND'].values_by_name["IdentifierModule"]._loaded_options = None
|
|
40
|
+
_globals['_SYNTAXKIND'].values_by_name["IdentifierModule"]._serialized_options = b'\010\001'
|
|
41
|
+
_globals['_DESCRIPTOR_SUFFIX']._loaded_options = None
|
|
42
|
+
_globals['_DESCRIPTOR_SUFFIX']._serialized_options = b'\020\001'
|
|
43
|
+
_globals['_DESCRIPTOR_SUFFIX'].values_by_name["Package"]._loaded_options = None
|
|
44
|
+
_globals['_DESCRIPTOR_SUFFIX'].values_by_name["Package"]._serialized_options = b'\010\001'
|
|
45
|
+
_globals['_OCCURRENCE'].fields_by_name['range']._loaded_options = None
|
|
46
|
+
_globals['_OCCURRENCE'].fields_by_name['range']._serialized_options = b'\030\001'
|
|
47
|
+
_globals['_OCCURRENCE'].fields_by_name['enclosing_range']._loaded_options = None
|
|
48
|
+
_globals['_OCCURRENCE'].fields_by_name['enclosing_range']._serialized_options = b'\030\001'
|
|
49
|
+
_globals['_PROTOCOLVERSION']._serialized_start=3540
|
|
50
|
+
_globals['_PROTOCOLVERSION']._serialized_end=3589
|
|
51
|
+
_globals['_TEXTENCODING']._serialized_start=3591
|
|
52
|
+
_globals['_TEXTENCODING']._serialized_end=3655
|
|
53
|
+
_globals['_POSITIONENCODING']._serialized_start=3658
|
|
54
|
+
_globals['_POSITIONENCODING']._serialized_end=3822
|
|
55
|
+
_globals['_SYMBOLROLE']._serialized_start=3825
|
|
56
|
+
_globals['_SYMBOLROLE']._serialized_end=3973
|
|
57
|
+
_globals['_SYNTAXKIND']._serialized_start=3976
|
|
58
|
+
_globals['_SYNTAXKIND']._serialized_end=4850
|
|
59
|
+
_globals['_SEVERITY']._serialized_start=4852
|
|
60
|
+
_globals['_SEVERITY']._serialized_end=4938
|
|
61
|
+
_globals['_DIAGNOSTICTAG']._serialized_start=4940
|
|
62
|
+
_globals['_DIAGNOSTICTAG']._serialized_end=5018
|
|
63
|
+
_globals['_LANGUAGE']._serialized_start=5021
|
|
64
|
+
_globals['_LANGUAGE']._serialized_end=6338
|
|
65
|
+
_globals['_INDEX']._serialized_start=20
|
|
66
|
+
_globals['_INDEX']._serialized_end=147
|
|
67
|
+
_globals['_METADATA']._serialized_start=150
|
|
68
|
+
_globals['_METADATA']._serialized_end=309
|
|
69
|
+
_globals['_TOOLINFO']._serialized_start=311
|
|
70
|
+
_globals['_TOOLINFO']._serialized_end=371
|
|
71
|
+
_globals['_DOCUMENT']._serialized_start=374
|
|
72
|
+
_globals['_DOCUMENT']._serialized_end=571
|
|
73
|
+
_globals['_SYMBOL']._serialized_start=573
|
|
74
|
+
_globals['_SYMBOL']._serialized_end=668
|
|
75
|
+
_globals['_PACKAGE']._serialized_start=670
|
|
76
|
+
_globals['_PACKAGE']._serialized_end=727
|
|
77
|
+
_globals['_DESCRIPTOR']._serialized_start=730
|
|
78
|
+
_globals['_DESCRIPTOR']._serialized_end=988
|
|
79
|
+
_globals['_DESCRIPTOR_SUFFIX']._serialized_start=823
|
|
80
|
+
_globals['_DESCRIPTOR_SUFFIX']._serialized_end=988
|
|
81
|
+
_globals['_SIGNATURE']._serialized_start=990
|
|
82
|
+
_globals['_SIGNATURE']._serialized_end=1090
|
|
83
|
+
_globals['_SYMBOLINFORMATION']._serialized_start=1093
|
|
84
|
+
_globals['_SYMBOLINFORMATION']._serialized_end=2614
|
|
85
|
+
_globals['_SYMBOLINFORMATION_KIND']._serialized_start=1339
|
|
86
|
+
_globals['_SYMBOLINFORMATION_KIND']._serialized_end=2614
|
|
87
|
+
_globals['_RELATIONSHIP']._serialized_start=2617
|
|
88
|
+
_globals['_RELATIONSHIP']._serialized_end=2747
|
|
89
|
+
_globals['_SINGLELINERANGE']._serialized_start=2749
|
|
90
|
+
_globals['_SINGLELINERANGE']._serialized_end=2828
|
|
91
|
+
_globals['_MULTILINERANGE']._serialized_start=2830
|
|
92
|
+
_globals['_MULTILINERANGE']._serialized_end=2932
|
|
93
|
+
_globals['_OCCURRENCE']._serialized_start=2935
|
|
94
|
+
_globals['_OCCURRENCE']._serialized_end=3407
|
|
95
|
+
_globals['_DIAGNOSTIC']._serialized_start=3410
|
|
96
|
+
_globals['_DIAGNOSTIC']._serialized_end=3538
|
|
97
|
+
# @@protoc_insertion_point(module_scope)
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Stub / SCIP-backed plugins for languages beyond the PHP beta.
|
|
2
|
+
|
|
3
|
+
ScipIndexerPlugin runs an external SCIP indexer and imports the result through
|
|
4
|
+
plugins/scip/importer.py. Detection works today; indexing runs only when the indexer
|
|
5
|
+
binary is installed (none are installed on the box yet: this is the v1 path).
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import shutil
|
|
10
|
+
import subprocess
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
from ...core.plugin import FrameworkPlugin, GraphBuilder, LanguagePlugin, Project
|
|
14
|
+
from ..scip.importer import import_scip
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ScipIndexerPlugin(LanguagePlugin):
|
|
18
|
+
def __init__(self, name: str, markers: list[str], command: list[str], lang_key: str, output="index.scip"):
|
|
19
|
+
self.name, self.markers, self.command, self.lang_key, self.output = name, markers, command, lang_key, output
|
|
20
|
+
|
|
21
|
+
def detect(self, project: Project) -> bool:
|
|
22
|
+
return any(project.exists(m) for m in self.markers)
|
|
23
|
+
|
|
24
|
+
def index(self, project: Project, builder: GraphBuilder, frameworks: list[FrameworkPlugin]) -> dict:
|
|
25
|
+
if not shutil.which(self.command[0]):
|
|
26
|
+
return {"status": "stub", "reason": f"indexer '{self.command[0]}' not installed", "command": " ".join(self.command)}
|
|
27
|
+
subprocess.run(self.command, cwd=project.root, check=True)
|
|
28
|
+
return import_scip(Path(project.root) / self.output, builder, self.lang_key)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
SCIP_PLUGINS = [
|
|
32
|
+
ScipIndexerPlugin("go", ["go.mod"], ["scip-go"], "go"),
|
|
33
|
+
ScipIndexerPlugin("java", ["pom.xml", "build.gradle"], ["scip-java", "index"], "java"),
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
# TypeScript/Vue/Nuxt moved to plugins/ts (language) and plugins/nuxt (framework); Python to plugins/python
|
|
37
|
+
# (+ plugins/django); Dart to plugins/dart (+ plugins/flutter). `index --scip` still imports a scip-python index.
|
|
38
|
+
# Rust and C/C++ moved to plugins/rust and plugins/cfamily (native plugins on rust-analyzer / scip-clang).
|
|
File without changes
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""Swift base URLs: what `{baseURL}` in a request URL template stands for.
|
|
2
|
+
|
|
3
|
+
Sources, per variable name (the last identifier of `\\(Config.baseURL)` / `baseURL.appendingPathComponent(...)`):
|
|
4
|
+
- a constant with an absolute URL literal and a base-like name (base / api / server / host / endpoint ...): `static let baseURL = URL(string: "https://api.example.com/v1")!`,
|
|
5
|
+
`let apiBase = "https://..."`;
|
|
6
|
+
- an Info.plist key read in Swift (`Bundle.main.object(forInfoDictionaryKey: "API_BASE_URL")`,
|
|
7
|
+
`Bundle.main.infoDictionary?["API_BASE_URL"]`), the key's value from the project's Info.plist files, and a
|
|
8
|
+
`$(VAR)` / `${VAR}` in it from the `.xcconfig` files (one value per configuration file: Debug / Release /
|
|
9
|
+
Staging...). xcconfig writes `//` as `/$()/` (`//` starts a comment there).
|
|
10
|
+
One value: the request's origin and path prefix come from it (an API call, `origin_kind` api). Several (per
|
|
11
|
+
environment): the origin stays the placeholder with `origin_kind` env and the candidates in `attrs.base_candidates`.
|
|
12
|
+
"""
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import os
|
|
16
|
+
import plistlib
|
|
17
|
+
import re
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
from codegraph import presets
|
|
21
|
+
|
|
22
|
+
CONST = re.compile(r'\b(?:let|var)\s+(\w+)\s*(?::\s*[\w.?!]+\s*)?=\s*(?:URL\s*\(\s*string\s*:\s*)?"(https?://[^"\\\s]+)"')
|
|
23
|
+
PLIST_READ = re.compile(r'\b(?:let|var)\s+(\w+)\b[^\n]{0,120}?(?:=|\{)(?:(?!\b(?:let|var|func)\b)[\s\S]){0,400}?'
|
|
24
|
+
r'(?:forInfoDictionaryKey\s*:\s*|infoDictionary\s*\??\s*\[\s*)"([\w.-]+)"')
|
|
25
|
+
BASE_NAME = re.compile(r"(?i)base|api|server|host|endpoint|backend|root|domain")
|
|
26
|
+
VAR = re.compile(r"\$[({](\w+)(?::[^)}]*)?[)}]")
|
|
27
|
+
# the Swift preset's dependency / build directories plus the coverage scan's (build/, vendor/, ...)
|
|
28
|
+
SKIP_DIRS = presets.skip_dirs("swift") | presets.skip_dirs("common", "scan_skip_dirs")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _walk(root: Path, pred) -> list[Path]:
|
|
32
|
+
out = []
|
|
33
|
+
for dp, dn, fn in os.walk(root):
|
|
34
|
+
dn[:] = sorted(d for d in dn if d not in SKIP_DIRS and not d.startswith("."))
|
|
35
|
+
out += [Path(dp) / f for f in sorted(fn) if pred(f)]
|
|
36
|
+
return out
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _xcconfig(path: Path, depth: int = 0) -> dict[str, str]:
|
|
40
|
+
"""Build settings of an .xcconfig file, its `#include`s first (later assignments win)."""
|
|
41
|
+
out: dict[str, str] = {}
|
|
42
|
+
try:
|
|
43
|
+
lines = path.read_text(errors="replace").splitlines()
|
|
44
|
+
except OSError:
|
|
45
|
+
return out
|
|
46
|
+
for ln in lines:
|
|
47
|
+
inc = re.match(r'^\s*#include\??\s+"([^"]+)"', ln)
|
|
48
|
+
if inc:
|
|
49
|
+
if depth < 4:
|
|
50
|
+
out.update(_xcconfig(path.parent / inc.group(1), depth + 1))
|
|
51
|
+
continue
|
|
52
|
+
ln = ln.replace("/$()/", "\x00") # the escaped `//` of URLs, before stripping comments
|
|
53
|
+
ln = re.sub(r"//.*$", "", ln).replace("\x00", "//").replace("$()", "").strip()
|
|
54
|
+
m = re.match(r"^([A-Za-z_]\w*)(?:\[[^\]]*\])?\s*=\s*(.*?);?$", ln)
|
|
55
|
+
if m:
|
|
56
|
+
out[m.group(1)] = m.group(2).strip().strip('"')
|
|
57
|
+
return out
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _plists(root: Path) -> dict[str, list[tuple[str, str]]]:
|
|
61
|
+
"""key -> [(string value, plist path)] of the project's Info.plist files."""
|
|
62
|
+
out: dict[str, list] = {}
|
|
63
|
+
for p in _walk(root, lambda f: f == "Info.plist" or f.endswith("-Info.plist")):
|
|
64
|
+
try:
|
|
65
|
+
with open(p, "rb") as fh:
|
|
66
|
+
d = plistlib.load(fh)
|
|
67
|
+
except Exception: # noqa: BLE001 (not a plist cg can read: skipped)
|
|
68
|
+
continue
|
|
69
|
+
if isinstance(d, dict):
|
|
70
|
+
for k, v in d.items():
|
|
71
|
+
if isinstance(v, str):
|
|
72
|
+
out.setdefault(k, []).append((v, p.relative_to(root).as_posix()))
|
|
73
|
+
return out
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def collect(root: Path, texts: dict[str, str]) -> dict[str, list[dict]]:
|
|
77
|
+
"""name -> [{value, source}] (distinct values)."""
|
|
78
|
+
found: dict[str, list[dict]] = {}
|
|
79
|
+
|
|
80
|
+
def add(name, value, source):
|
|
81
|
+
lst = found.setdefault(name, [])
|
|
82
|
+
if value and not any(x["value"] == value for x in lst):
|
|
83
|
+
lst.append({"value": value, "source": source})
|
|
84
|
+
for rel, txt in texts.items():
|
|
85
|
+
for m in CONST.finditer(txt):
|
|
86
|
+
if BASE_NAME.search(m.group(1)): # `let url = URL(string: "https://httpbin.org/get")` is a request
|
|
87
|
+
add(m.group(1), m.group(2).rstrip("/"), f"{rel}: {m.group(1)}")
|
|
88
|
+
reads = [(m.group(1), m.group(2), rel) for rel, txt in texts.items()
|
|
89
|
+
if "forInfoDictionaryKey" in txt or "infoDictionary" in txt for m in PLIST_READ.finditer(txt)]
|
|
90
|
+
if reads:
|
|
91
|
+
plists = _plists(root)
|
|
92
|
+
configs = [(p.relative_to(root).as_posix(), _xcconfig(p)) for p in _walk(root, lambda f: f.endswith(".xcconfig"))]
|
|
93
|
+
for name, key, rel in reads:
|
|
94
|
+
for raw, ppath in plists.get(key, []):
|
|
95
|
+
vs = VAR.findall(raw)
|
|
96
|
+
if not vs:
|
|
97
|
+
if re.match(r"https?://", raw):
|
|
98
|
+
add(name, raw.rstrip("/"), f"{ppath} {key}")
|
|
99
|
+
continue
|
|
100
|
+
for cpath, cfg in configs:
|
|
101
|
+
if all(v in cfg for v in vs):
|
|
102
|
+
val = VAR.sub(lambda m: cfg.get(m.group(1), ""), raw)
|
|
103
|
+
for _ in range(3): # values referring to other settings
|
|
104
|
+
if not VAR.search(val):
|
|
105
|
+
break
|
|
106
|
+
val = VAR.sub(lambda m: cfg.get(m.group(1), ""), val)
|
|
107
|
+
if re.match(r"https?://", val):
|
|
108
|
+
add(name, val.rstrip("/"), f"{ppath} {key} = {raw} ({cpath})")
|
|
109
|
+
return found
|