Skip to content

Commit

Permalink
Exclude more env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikschulz authored Nov 24, 2022
1 parent eb5af66 commit 0fae794
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions internal/config/docs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func usedEnvs(t *testing.T) map[string]bool {
if info.IsDir() && strings.HasPrefix(info.Name(), ".") && path != dir {
return filepath.SkipDir
}
if info.IsDir() && info.Name() == "helpers" {
if info.IsDir() && (info.Name() == "helpers" || info.Name() == "tests") {
return filepath.SkipDir
}
if info.IsDir() {
Expand Down Expand Up @@ -202,9 +202,17 @@ func usedEnvsInFile(t *testing.T, fn string, opts map[string]bool, re *regexp.Re
defer fh.Close() //nolint:errcheck

ignored := map[string]bool{
"HOME": true,
"APPDATA": true,
"LOCALAPPDATA": true,
"HOME": true,
"APPDATA": true,
"LOCALAPPDATA": true,
"GIT_AUTHOR_EMAIL": true,
"GIT_AUTHOR_NAME": true,
"XDG_DATA_HOME": true,
"GPG_TTY": true,
"XDG_CONFIG_HOME": true,
"XDG_CACHE_HOME": true,
"GNUPGHOME": true,
"GOPATH": true,
}

scanner := bufio.NewScanner(fh)
Expand Down

0 comments on commit 0fae794

Please sign in to comment.