Skip to content

Search: Use Ignore Files exclude source files not in .gitignore or .ignore #148357

Description

@Asgaroth

Issue Type: Bug

Enabling Search: Use Ignore Files causes some source files to not show up in the results unless explicitly added to "files to include"

Does this issue occur when all extensions are disabled?: Yes

.gitignore file is empty and I don't have a .ignore file

search.useGlobalIgnoreFiles = false
search.useParentIgnoreFiles = false

With setting disabled

Screen Shot 2022-04-28 at 9 29 15 AM

[2022-04-28 09:30:45.222] [renderer1] [trace] SearchService#search {"_reason":"searchView","folderQueries":[{"folder":{"$mid":1,"fsPath":"/Users/alex/src/panamaRN","external":"file:///Users/alex/src/panamaRN","path":"/Users/alex/src/panamaRN","scheme":"file"},"excludePattern":{"**/.git":true,"**/.svn":true,"**/.hg":true,"**/CVS":true,"**/.DS_Store":true,"**/Thumbs.db":true,"**/node_modules":true,"**/bower_components":true,"**/*.code-search":true,"**/.expo":true},"fileEncoding":"utf8","disregardIgnoreFiles":true,"disregardGlobalIgnoreFiles":true,"disregardParentIgnoreFiles":true,"ignoreSymlinks":false}],"usingSearchPaths":false,"onlyOpenEditors":false,"maxResults":20000,"type":2,"contentPattern":{"pattern":"shopReducer","isRegExp":false,"isCaseSensitive":false,"isWordMatch":false,"wordSeparators":"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"},"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}

With setting enabled

Screen Shot 2022-04-28 at 9 29 24 AM

[2022-04-28 09:34:17.094] [renderer1] [trace] SearchService#search {"_reason":"searchView","folderQueries":[{"folder":{"$mid":1,"fsPath":"/Users/alex/src/panamaRN","external":"file:///Users/alex/src/panamaRN","path":"/Users/alex/src/panamaRN","scheme":"file"},"excludePattern":{"**/.git":true,"**/.svn":true,"**/.hg":true,"**/CVS":true,"**/.DS_Store":true,"**/Thumbs.db":true,"**/node_modules":true,"**/bower_components":true,"**/*.code-search":true,"**/.expo":true},"fileEncoding":"utf8","disregardIgnoreFiles":false,"disregardGlobalIgnoreFiles":true,"disregardParentIgnoreFiles":true,"ignoreSymlinks":false}],"usingSearchPaths":false,"onlyOpenEditors":false,"maxResults":20000,"type":2,"contentPattern":{"pattern":"shopReducer","isRegExp":false,"isCaseSensitive":false,"isWordMatch":false,"wordSeparators":"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"},"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}

With setting enabled + files to include

Screen Shot 2022-04-28 at 9 29 35 AM

[2022-04-28 09:34:45.219] [renderer1] [trace] SearchService#search {"_reason":"searchView","folderQueries":[{"folder":{"$mid":1,"fsPath":"/Users/alex/src/panamaRN","external":"file:///Users/alex/src/panamaRN","path":"/Users/alex/src/panamaRN","scheme":"file"},"excludePattern":{"**/.git":true,"**/.svn":true,"**/.hg":true,"**/CVS":true,"**/.DS_Store":true,"**/Thumbs.db":true,"**/node_modules":true,"**/bower_components":true,"**/*.code-search":true,"**/.expo":true},"fileEncoding":"utf8","disregardIgnoreFiles":false,"disregardGlobalIgnoreFiles":true,"disregardParentIgnoreFiles":true,"ignoreSymlinks":false,"includePattern":{"src":true,"src/**":true}}],"usingSearchPaths":true,"onlyOpenEditors":false,"maxResults":20000,"type":2,"contentPattern":{"pattern":"shopReducer","isRegExp":false,"isCaseSensitive":false,"isWordMatch":false,"wordSeparators":"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"},"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}

VS Code version: Code - Insiders 1.67.0-insider (Universal) (7fc8af4, 2022-04-28T05:19:19.018Z)
OS version: Darwin arm64 21.3.0
Restricted Mode: No

System Info
Item Value
CPUs Apple M1 Max (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 4
Memory (System) 64.00GB (18.02GB free)
Process Argv
Screen Reader yes
VM 0%
Extensions: none
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
pythonvspyt200:30323110
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
wslgetstarted:30449409
pythonvsnew555:30438690
vscscmwlcmt:30465136
cppdebugcf:30475217
vsclangdc:30480125

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions