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

Include / exclude behavior differs with --stdin #816

Open
thatsmydoing opened this issue Jan 29, 2024 · 0 comments
Open

Include / exclude behavior differs with --stdin #816

thatsmydoing opened this issue Jan 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@thatsmydoing
Copy link

Version: 0.45.0

With the following dprint.json:

{
  "typescript": {
  },
  "includes": [
    "a/**/*.ts"
  ],
  "excludes": [
    "a/b",
    "**/node_modules"
  ],
  "plugins": [
    "https://plugins.dprint.dev/typescript-0.88.10.wasm"
  ]
}

And a file a/b/c.ts

Running

dprint fmt a/b/c.ts

errors with no files found which is expected.

However, when running

cat a/b/c.ts | dprint fmt --stdin $(pwd)/a/b/c.ts

dprint will print out a formatted version of the file.

Changing the excludes to a/b/** properly makes the --stdin format print out the file as-is.

@dsherret dsherret added the bug Something isn't working label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants