diff --git a/.github/workflows/debricked.yml b/.github/workflows/debricked.yml index 43244fab..047b2678 100644 --- a/.github/workflows/debricked.yml +++ b/.github/workflows/debricked.yml @@ -24,4 +24,4 @@ jobs: restore-keys: | ${{ runner.os }}-go- - run: | - go run cmd/debricked/main.go scan -t ${{ secrets.DEBRICKED_TOKEN }} -e "pkg/**" -e "test/**" + go run cmd/debricked/main.go scan -t ${{ secrets.DEBRICKED_TOKEN }} -e "pkg/**" -e "test/**" -e "**/testdata/**" diff --git a/internal/file/finder_test.go b/internal/file/finder_test.go index bd3eb6c3..0317cfdc 100644 --- a/internal/file/finder_test.go +++ b/internal/file/finder_test.go @@ -215,6 +215,11 @@ func TestExclude(t *testing.T) { exclusions: []string{"**/yarn/**"}, expectedExclusions: []string{"yarn", "yarn.lock"}, }, + { + name: "TestDirectoryExclusionWithDoublestar", + exclusions: []string{"testdata/test/**"}, + expectedExclusions: []string{"test", "test-file"}, + }, } for _, c := range cases { diff --git a/internal/file/testdata/misc/package.json b/internal/file/testdata/misc/package.json index 243b6802..e69de29b 100644 --- a/internal/file/testdata/misc/package.json +++ b/internal/file/testdata/misc/package.json @@ -1,5 +0,0 @@ -{ - "dependencies": { - "chart.js": "^2.9.3" - } -} diff --git a/internal/file/testdata/test/test-file b/internal/file/testdata/test/test-file new file mode 100644 index 00000000..e69de29b