Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect and remove unused functions #3

Open
Anton-Latukha opened this issue Sep 1, 2017 · 1 comment
Open

Detect and remove unused functions #3

Anton-Latukha opened this issue Sep 1, 2017 · 1 comment

Comments

@Anton-Latukha
Copy link

Anton-Latukha commented Sep 1, 2017

Would be great if flatten could track what functions are really used. And then if possible, - variables.
Maybe it is done already in the flatten, I not looked at this time.
If flattened scripts deliberately have some sort of additional info for shellfire development after, flatten can have a option --strip

Like start from:
core_init_main "$@" and recursively check what functions use what functions.
And; as script has the only one entry point, root node - core_init_main - that means all functions not connected with core_init_main can be cleaned-out.

Basic overdrive example parses example right after flatten. So I see it probably works well without unconnected functions.

@raphaelcohn
Copy link
Member

It would probably be quite challenging to do reliably without writing a shell parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants