Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deno check does not respect top level exclude in deno.json #26864

Open
mochalins opened this issue Nov 14, 2024 · 9 comments
Open

deno check does not respect top level exclude in deno.json #26864

mochalins opened this issue Nov 14, 2024 · 9 comments
Labels
needs investigation requires further investigation before determining if it is an issue or not tsc related to the TypeScript tsc compiler workspaces

Comments

@mochalins
Copy link

Version: Deno 2.0.6

Running deno check . in the project root directory checks files within a directory foo/bar specified in exclude. deno fmt and deno lint respect the exclude configuration.

Running deno check foo/bar where foo/bar/ is the excluded directory will return a warning that no matching files were found.

TLDR:

  • foo/bar/ in top level exclude in deno.json
  • deno check . reports errors in foo/bar/baz.ts
  • deno check foo/bar returns warning that no matching files were found.
@bartlomieju bartlomieju added tsc related to the TypeScript tsc compiler workspaces needs investigation requires further investigation before determining if it is an issue or not labels Nov 14, 2024
@HasanAlrimawi
Copy link
Contributor

image
I can't reproduce it if these reproduction steps are correct.
@mochalins

@mochalins
Copy link
Author

image

I can't reproduce it if these reproduction steps are correct.

@mochalins

In my project, the a.js was a typescript file and index.ts imported functions/types from a.js.

Perhaps that might be the difference here?

@HasanAlrimawi
Copy link
Contributor

It's still the same:
Notice the last log in the terminal
image

@mochalins
Copy link
Author

Interesting; I'm not sure what's causing the difference.

I'll temporarily make my project public and share here so the issue is reproducible.

@mochalins
Copy link
Author

mochalins commented Nov 19, 2024

https://github.com/pmotionf/drivercom-gui

Reproduction steps:

  1. Clone repository above and checkout the deno_check branch
  2. After running deno i, run deno task prepare
  3. Compare deno check . v.s. deno check src/components/ui
  4. Similary to above, also compare deno check --unstable-sloppy-imports . v.s. deno check --unstable-sloppy-imports styled-system

@HasanAlrimawi

@HasanAlrimawi
Copy link
Contributor

I tried deno check --unstable-sloppy-imports . & deno check --unstable-sloppy-imports src/components/ui and as you can see, both of them ignored src/components/ui
image
P.S I'm using windows!

@mochalins
Copy link
Author

The components/ui here was not ignored in the "deno check ." case, but instead checked successfully! You can see that the "styled-system" that is also in "exclude" is not ignored.

You can compare with "deno check styled-system"

@HasanAlrimawi
Copy link
Contributor

HasanAlrimawi commented Nov 19, 2024

I can't see components/ui listed. However, I edited one of its files to see if an error will be captured by deno check and yes it was captured same as errors in styled-systems.

Turns out you're right, the problem exists.

@mochalins
Copy link
Author

@bartlomieju Is the "needs investigation" tag still applicable here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation requires further investigation before determining if it is an issue or not tsc related to the TypeScript tsc compiler workspaces
Projects
None yet
Development

No branches or pull requests

3 participants