qri-io / qri

you're invited to a data party!
https://qri.io
GNU General Public License v3.0
1.1k stars 66 forks source link

feat(transform): apply --analyze will display unused funcs #1934

Closed dustmop closed 2 years ago

dustmop commented 2 years ago

Package staticlark is a static analyzer for starlark. For now, it collects function definitions and top-level calls, then builds a call graph. This call graph can be used to determine unused functions in a script.

Run qri apply --analyze --file my_transform.star to see output from the static analyzer, if any. Example output:

> qri apply --analyze --file my_transform.star
Functions not called: some_func_name another_func_name