Skip to content

Commit

Permalink
exclude node modules folder from the scan
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahCx committed Oct 15, 2024
1 parent 8bcbea2 commit e712243
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/commands/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,15 @@ func Test_isDirFiltered(t *testing.T) {
want: true,
wantErr: false,
},
{
name: "WhenNodeModulesExcluded_ReturnIsFilteredTrue",
args: args{
filename: "node_modules",
filters: commonParams.BaseExcludeFilters,
},
want: true,
wantErr: false,
},
}
for _, tt := range tests {
ttt := tt
Expand Down
1 change: 1 addition & 0 deletions internal/params/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ var BaseExcludeFilters = []string{
"!.vs",
"!.vscode",
"!.idea",
"!node_modules",
}

var KicsBaseFilters = []string{
Expand Down

0 comments on commit e712243

Please sign in to comment.