MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / get_apkbuild_variables

Function get_apkbuild_variables

src/packagedcode/alpine.py:276–288  ·  view source on GitHub ↗

Parse ``text`` and return a tuple of (variables, errors) where variables is a list of bashparse.ShellVariables with a name listed in the ``names`` set.

(text)

Source from the content-addressed store, hash-verified

274
275
276def get_apkbuild_variables(text):
277 """
278 Parse ``text`` and return a tuple of (variables, errors) where variables is
279 a list of bashparse.ShellVariables with a name listed in the ``names`` set.
280 """
281 fixed_text = fix_apkbuild(text)
282
283 variables, errors = bashparse.collect_shell_variables_from_text(
284 text=fixed_text,
285 resolve=True,
286 needed_variables=APKBUILD_VARIABLES,
287 )
288 return variables, errors
289
290
291def replace_fix(text, source, target, *args):

Callers 1

parse_apkbuild_textFunction · 0.85

Calls 1

fix_apkbuildFunction · 0.85

Tested by

no test coverage detected