File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -112,15 +112,20 @@ class JsonSchemaCoverageProvider {
112
112
113
113
// Build coverage maps
114
114
for ( const root of this . roots ) {
115
+ const i = ignore ( ) ;
116
+ const gitignorePath = path . resolve ( root , ".gitignore" ) ;
117
+ if ( existsSync ( gitignorePath ) ) {
118
+ const gitignore = await fs . readFile ( gitignorePath , "utf-8" ) ;
119
+ i . add ( gitignore ) ;
120
+ }
121
+
115
122
let includedFiles = await glob ( this . include , {
116
123
cwd : root ,
117
124
dot : true ,
118
125
onlyFiles : true
119
126
} ) ;
120
- const gitignorePath = path . resolve ( root , ".gitignore" ) ;
121
- const gitignore = await fs . readFile ( gitignorePath , "utf-8" ) ;
122
- const files = ignore ( )
123
- . add ( gitignore )
127
+
128
+ const files = i
124
129
. filter ( includedFiles )
125
130
. map ( ( file ) => path . resolve ( root , file ) ) ;
126
131
You can’t perform that action at this time.
0 commit comments