-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Milestone
Description
Situation
#!/bin/bash
function startMe() {
local data
echo "hello world" >> $data
echo "xx:$data"
}
startMedata cannot be marked - local variables in functions are currently not recognized
Wanted
local xyz and also
local xyz=... shall be recognized as local variables
These local variables shall only be marked inside the function!
Solution
- if not already done keep "isLocal" flag inside BashVariable. So we know if its a local variable or not
- introduce a getFunction():BashFunction method. For global variables this will return
null - getUsages() for a local variable may only return the usages inside the function - this can be done by not iterating over the complete tokens, but only those inside the function (this information should be already available)