Skip to content

Commit c6f4495

Browse files
committed
Go: Exclude dummy files from File
1 parent be52150 commit c6f4495

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

go/ql/lib/semmle/go/Files.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ class ExtractedOrExternalFile extends Container, Impl::File, Documentable, ExprP
124124
/** A file that has been extracted. */
125125
class File extends ExtractedOrExternalFile {
126126
File() {
127+
not this.getBaseName() = "-" and
127128
// getAChild is specifically for the Go AST and so does not apply to non-go files
128129
// we care about all non-go extracted files, as only go files can have `@file` entries due to requiring a file entry for diagnostic errors
129130
not this.getExtension() = "go"

0 commit comments

Comments
 (0)