summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/globalvars.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools/pkglint/files/globalvars.go')
-rw-r--r--pkgtools/pkglint/files/globalvars.go33
1 files changed, 20 insertions, 13 deletions
diff --git a/pkgtools/pkglint/files/globalvars.go b/pkgtools/pkglint/files/globalvars.go
index 2bab3cdf38d..51dc69905e5 100644
--- a/pkgtools/pkglint/files/globalvars.go
+++ b/pkgtools/pkglint/files/globalvars.go
@@ -6,19 +6,20 @@ import (
)
type GlobalVars struct {
- opts CmdOpts
- globalData GlobalData
- pkgContext *PkgContext
- mkContext *MkContext
+ opts CmdOpts //
+ globalData GlobalData //
+ Pkg *Package // The package that is currently checked.
+ Mk *MkLines // The Makefile (or fragment) that is currently checked.
- todo []string // The items that still need to be checked.
- currentDir string // The currently checked directory, relative to the cwd
- curPkgsrcdir string // The pkgsrc directory, relative to currentDir
- isWip bool // Is the currently checked directory from pkgsrc-wip?
- isInfrastructure bool // Is the currently checked item from the pkgsrc infrastructure?
+ Todo []string // The files or directories that still need to be checked.
+ CurrentDir string // The currently checked directory, relative to the cwd
+ CurPkgsrcdir string // The pkgsrc directory, relative to currentDir
+ Wip bool // Is the currently checked directory from pkgsrc-wip?
+ Infrastructure bool // Is the currently checked item from the pkgsrc infrastructure?
+ TestingData *TestingData // Is pkglint in self-testing mode (only during development)?
- ipcDistinfo map[string]*Hash // Maps "alg:fname" => "checksum".
- ipcUsedLicenses map[string]bool // Maps "license name" => true
+ Hash map[string]*Hash // Maps "alg:fname" => hash (inter-package check).
+ UsedLicenses map[string]bool // Maps "license name" => true (inter-package check).
errors int
warnings int
@@ -28,11 +29,13 @@ type GlobalVars struct {
traceDepth int
logOut io.Writer
logErr io.Writer
- traceOut io.Writer
+ debugOut io.Writer
res map[string]*regexp.Regexp
rematch *Histogram
renomatch *Histogram
+ retime *Histogram
+ loghisto *Histogram
}
type CmdOpts struct {
@@ -94,4 +97,8 @@ type Hash struct {
line *Line
}
-var G *GlobalVars
+type TestingData struct {
+ VerifiedBits map[string]bool
+}
+
+var G GlobalVars