diff options
| author | nokazn <41154684+nokazn@users.noreply.github.com> | 2024-01-04 10:43:17 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-03 20:43:17 -0500 |
| commit | a0b687235907ce91358677353c00f575548313b4 (patch) | |
| tree | 5a91d08d997ac7226208f3a24211fef9ef1123ef /cli/tests/testdata | |
| parent | 00970daea2245bf4af6b3ee21d0e522fec5638b8 (diff) | |
fix(cli): respect `exclude` option for `deno check` command (#21779)
This PR fixes #21658.
- `check` subcommand sees `exclude` option in `deno.json`. When some
paths passed with `check` command listed in `exclude`, they are ignored.
- When some files are listed in `exclude` and imported indirectly among
module graph, they are checked.
Diffstat (limited to 'cli/tests/testdata')
6 files changed, 23 insertions, 0 deletions
diff --git a/cli/tests/testdata/check/exclude_option/deno.exclude_dir.json b/cli/tests/testdata/check/exclude_option/deno.exclude_dir.json new file mode 100644 index 000000000..2019f8953 --- /dev/null +++ b/cli/tests/testdata/check/exclude_option/deno.exclude_dir.json @@ -0,0 +1,5 @@ +{ + "exclude": [ + "ignored" + ] +} diff --git a/cli/tests/testdata/check/exclude_option/deno.exclude_glob.json b/cli/tests/testdata/check/exclude_option/deno.exclude_glob.json new file mode 100644 index 000000000..1d203ba08 --- /dev/null +++ b/cli/tests/testdata/check/exclude_option/deno.exclude_glob.json @@ -0,0 +1,5 @@ +{ + "exclude": [ + "ignored/**/*" + ] +} diff --git a/cli/tests/testdata/check/exclude_option/deno.json b/cli/tests/testdata/check/exclude_option/deno.json new file mode 100644 index 000000000..a9eca74ca --- /dev/null +++ b/cli/tests/testdata/check/exclude_option/deno.json @@ -0,0 +1,3 @@ +{ + "exclude": [] +} diff --git a/cli/tests/testdata/check/exclude_option/exclude_option.ts.error.out b/cli/tests/testdata/check/exclude_option/exclude_option.ts.error.out new file mode 100644 index 000000000..abd1c1258 --- /dev/null +++ b/cli/tests/testdata/check/exclude_option/exclude_option.ts.error.out @@ -0,0 +1,4 @@ +error: TS2304 [ERROR]: Cannot find name 'nothing'. +export { nothing }; + ~~~~~~~ + at [WILDCARD] diff --git a/cli/tests/testdata/check/exclude_option/ignored/index.ts b/cli/tests/testdata/check/exclude_option/ignored/index.ts new file mode 100644 index 000000000..0419cf073 --- /dev/null +++ b/cli/tests/testdata/check/exclude_option/ignored/index.ts @@ -0,0 +1 @@ +export { nothing }; diff --git a/cli/tests/testdata/check/exclude_option/index.ts b/cli/tests/testdata/check/exclude_option/index.ts new file mode 100644 index 000000000..8335ca3a2 --- /dev/null +++ b/cli/tests/testdata/check/exclude_option/index.ts @@ -0,0 +1,5 @@ +import { nothing } from "./ignored/index.ts"; + +const foo = 1; + +export { foo, nothing }; |
