Powershell/any script to delete unused variables,functions from given program file
Budget: ₹600 – ₹1,500 INR
I need a single script to remove the unused variables and functions from the program file. Ex:-
remove_var_fun.ps1 targetfilename newfilename
Steps:-
The script should take variable names declared in the format of int, double, bool in the declaration part.
The script should check if the variable is used in the program at least once.
If the variable is not used remove the variable from the file.
The script should list all the functions defined in the program.
If the function is not called in the program it should remove the function declaration from the program.
I have attached the sample program to remove variables and functions. Please check.
remove_var_fun.ps1 targetfilename newfilename
Steps:-
The script should take variable names declared in the format of int, double, bool in the declaration part.
The script should check if the variable is used in the program at least once.
If the variable is not used remove the variable from the file.
The script should list all the functions defined in the program.
If the function is not called in the program it should remove the function declaration from the program.
I have attached the sample program to remove variables and functions. Please check.