Skip to content

Commit 006af2c

Browse files
committed
Fixed failing test.
1 parent 4f32d19 commit 006af2c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

sqlparser/parser.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ func ParseFilesystems(fslst []fs.FS, includeTags []string) (filenames []string,
5050

5151
hashes := make(map[[32]byte]string)
5252

53+
if result == nil {
54+
result = &mssql.TSqlDocument{}
55+
}
56+
5357
for fidx, fsys := range fslst {
5458
// WalkDir is in lexical order according to docs, so output should be stable
5559
err = fs.WalkDir(fsys, ".",
@@ -97,9 +101,6 @@ func ParseFilesystems(fslst []fs.FS, includeTags []string) (filenames []string,
97101
// only include if include tags match
98102
if matchesIncludeTags(fdoc.PragmaIncludeIf(), includeTags) {
99103
filenames = append(filenames, pathDesc)
100-
if result == nil {
101-
result = &mssql.TSqlDocument{}
102-
}
103104
result.Include(fdoc)
104105
}
105106
}

0 commit comments

Comments
 (0)