mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-12 00:05:14 +08:00
Control Flow Graph / Data Flow Analysis support
This commit is contained in:
@@ -2,9 +2,27 @@ module ShellCheck.Data where
|
||||
|
||||
import ShellCheck.Interface
|
||||
import Data.Version (showVersion)
|
||||
import Paths_ShellCheck (version)
|
||||
|
||||
shellcheckVersion = showVersion version -- VERSIONSTRING
|
||||
|
||||
{-
|
||||
If you are here because you saw an error about Paths_ShellCheck in this file,
|
||||
simply comment out the import below and define the version as a constant string.
|
||||
|
||||
Instead of:
|
||||
|
||||
import Paths_ShellCheck (version)
|
||||
shellcheckVersion = showVersion version
|
||||
|
||||
Use:
|
||||
|
||||
-- import Paths_ShellCheck (version)
|
||||
shellcheckVersion = "kludge"
|
||||
|
||||
-}
|
||||
|
||||
import Paths_ShellCheck (version)
|
||||
shellcheckVersion = showVersion version -- VERSIONSTRING
|
||||
|
||||
|
||||
internalVariables = [
|
||||
-- Generic
|
||||
@@ -43,9 +61,12 @@ internalVariables = [
|
||||
"flags_error", "flags_return"
|
||||
]
|
||||
|
||||
specialVariablesWithoutSpaces = [
|
||||
"$", "-", "?", "!", "#"
|
||||
specialIntegerVariables = [
|
||||
"$", "?", "!", "#"
|
||||
]
|
||||
|
||||
specialVariablesWithoutSpaces = "-" : specialIntegerVariables
|
||||
|
||||
variablesWithoutSpaces = specialVariablesWithoutSpaces ++ [
|
||||
"BASHPID", "BASH_ARGC", "BASH_LINENO", "BASH_SUBSHELL", "EUID", "LINENO",
|
||||
"OPTIND", "PPID", "RANDOM", "SECONDS", "SHELLOPTS", "SHLVL", "UID",
|
||||
|
Reference in New Issue
Block a user