The Gentoo eclass list is now populated using pure Haskell. The old
python generators and generated module are no longer needed.
Signed-off-by: hololeap <hololeap@users.noreply.github.com>
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>
Uses the `portageq` command to scan for repositories, which in turn are
scanned for eclasses, which are then scanned for eclass variables.
The variables are scanned using a heuristic which looks for
"# @ECLASS_VARIABLE: "
at the start of each line, which means only properly documented
variables will be found.
Signed-off-by: hololeap <hololeap@users.noreply.github.com>
* The short description used to say that until commit
aac7d76047 from 2014. It appears that
it was changed by mistake in that commit to something less readable.
* With the message "use -print0/-0" we were confused and introduced a
bug in our code because we didn't understand what to do with the
"-0".
* SC2011 (source
c9e27c2470/src/ShellCheck/Analytics.hs (L591))
uses that exact warning message, we copied it from there.
Signed-off-by: Bruce Ricard <bricard@vmware.com>
The whole test suite passes for me, including prop_checkOverwrittenExitCode8,
and I get the same set of findings with this build and shellcheck.net on
tools/testing/selftests/net/icmp_redirect.sh.
Trunk Check is a universal linter which integrates with a wide variety of linters and formatters, `shellcheck` included.
We're big fans of `shellcheck` and figured that you might find our tool to be interesting enough to include it in the integrations list.
Fixes the following error:
src/ShellCheck/CFGAnalysis.hs:1394:40: error:
* Couldn't match expected type `[S.Set a]'
with actual type `M.Map String FunctionValue'
* In the second argument of `($)', namely
`mapStorage $ sFunctionTargets state'
In the expression: S.unions $ mapStorage $ sFunctionTargets state
In an equation for `declaredFuncs':
declaredFuncs = S.unions $ mapStorage $ sFunctionTargets state
* Relevant bindings include
declaredFuncs :: S.Set a
(bound at src/ShellCheck/CFGAnalysis.hs:1394:13)