Greetings,
I run ISESteroids and one thing I find really useful is that above each function definition, it automatically inserts the phrase 'X - references' to show how many times that function has been called. That might be 'relatively' easy to add to PS if you count the calls from within the same file (e.g.psf) only.
However, I have a 'common functions' ps1 file that I call from loads of other psf files. To count the references from all those would be awesome but that would probably require an option to set one or more 'base' folders where function call references would be searched.
Cheers
David
Adding total function references to each defined function
Forum rules
Do not post any licensing information in this forum.
Do not post any licensing information in this forum.
Re: Adding total function references to each defined function
Hi David,
Getting a list of references is fairly simple, even over loosely connected files:
Dir -Path "<Script Root>" -Recurse | Select-String "Get-ExampleFunctionName"
You could probably build a little GUI application for that and integrate it as an external tool into PSS.
Cheers,
Bosparan
Getting a list of references is fairly simple, even over loosely connected files:
Dir -Path "<Script Root>" -Recurse | Select-String "Get-ExampleFunctionName"
You could probably build a little GUI application for that and integrate it as an external tool into PSS.
Cheers,
Bosparan
Re: Adding total function references to each defined function
You can use PowerShell Studio's Find All References command:
David
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.