--include / --files documentation is confusing
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- cli, documentation
Research direction
Start in the README's "How to use" section, especially the --include example, and compare it with the reported --files commands and the --folder behavior. Clarify how file selection differs between workspace and folder mode, with an example that makes pre-commit usage unambiguous; the README should explain why only one file may not be formatted.
Written by the indexing model from the issue text.
Description
When I run dotnet format --files .\src\ProjectFolder\Program.cs -v detailed I always see
Formatting code files in workspace 'SOLUTION_FOLDER\Solution.sln'.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Formatted 0 of 321 files.
Format complete in 5402ms.
I would have expected to see only one file formatted.
it works, when I run dotnet format --folder . --files .\src\ProjectFolder\Program.cs -v detailed (kudos to https://github.com/dotnet/format/issues/403)
But in the README it's described as dotnet format --include Programs.cs Utility\Logging.cs without further explanation (https://github.com/dotnet/format#how-to-use) - maybe it could be improved?
Background:
The reason I want to specify only specific files, is to run it as a pre-commit hook as quickly as possible.
- Dominant language
- No language data
- Stars
- 1.9k
- Forks
- 173
- Avg merge
- 10d 13h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/format
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Py Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
from:qa priority:P2 reliability tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spec-kitty/spec-kitty#4874 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·