Version: Deno 2.2.5 ### Steps to reproduce Create the following workspace: ```jsonc // deno.json { "fmt": { "singleQuote": true, "semiColons": true }, "workspace": ["sub"] } ``` ```jsonc // sub/deno.json { "fmt": { "singleQuote": false, "semiColons": false } } ``` ```ts // test.ts console.log( "test") ``` ```ts // sub/test.ts console.log( "sub/test") ``` Then run `deno fmt .` **(the `.` is crucial here)** ### Expected result - `test.ts` must have `console.log('test');` - `sub/test.ts` must have `console.log("sub/test")` - Deno must report `Checked 4 files` ### Actual result - `test.ts` has `console.log("test")` - Note: It is formatted using not `deno.json`, but `sub/deno.json` - `sub/test.ts` has `console.log("sub/test")` - Deno reports `Checked 6 files` ### Research I spent some time debugging it. It seems the additional CLI argument paths are added as `include` set to each workspace member `FilePatterns`. Thus, when Deno formats the root, it includes `deno.json` and `test.ts`; then, when Deno formats the `sub` workspace member, it includes `sub/deno.json`, `sub/test.ts`, **and_ also `.`** i.e. `deno.json` and `test.ts` again. Hence `Checked 6 files` message. Note that `deno fmt` (without paths) works as expected.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by 0x009922 and has received 1 comments.