mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-10 15:22:58 -07:00
Scan for Gentoo eclass variables
Creates a Map of eclass names to eclass variables by scanning the system for repositories and their respective eclasses. Runs `portageq` to determine repository names and locations. Emits a warning if an IOException is caught when attempting to run `portageq`. This Map is passed via CheckSpec to AnalysisSpec and finally to Parameters, where it is read by `checkUnusedAssignments` in order to determine which variables can be safely ignored by this check. Signed-off-by: hololeap <hololeap@users.noreply.github.com>
This commit is contained in:
parent
08ae7ef836
commit
272ef819b9
8 changed files with 58 additions and 18 deletions
|
@ -2412,7 +2412,10 @@ allInternalVariables params =
|
|||
genericInternalVariables ++
|
||||
if shellType params == Ksh then kshInternalVariables else [] ++
|
||||
if isPortageBuild params
|
||||
then portageInternalVariables (getInheritedEclasses (rootNode params))
|
||||
then
|
||||
let eclasses = getInheritedEclasses $ rootNode params
|
||||
gMap = gentooData params
|
||||
in portageInternalVariables eclasses gMap
|
||||
else []
|
||||
|
||||
prop_checkUnused0 = verifyNotTree checkUnusedAssignments "var=foo; echo $var"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue