dotnet / dotnet/format

[v6] dotnet format don't respect --include option

Open
#1,479 9 comments 27 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
1.9k
Forks
173
Avg merge
10d 13h
Merged PRs (30d)
1

Description

Hi,
I'm the maintainer of [Husky.Net](https://github.com/alirezanet/Husky.Net) tool, In big projects using dotnet-format is a real pain, it takes a lot of time to complete. This is one of the reasons that I created Husky.Net. usually, people only want to format changed files( or staged files). In the previous versions (e.g v5) we could've easily limited the dotnet-format working area to the specific files using `--include` but in the last version looks like dotnet-format doing something else in the background and don't respect that option.

```shell
dotnet format --include folder/targetFile.cs folder/targetFile2.cs
```
The expected behavior is ignoring everything else except the target files. or providing an option to change its behavior.
This issue makes dotnet-format v6 almost unusable, how can I fix this problem or change its behavior?
Thank you

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.