error WHITESPACE is an invalid report
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Reproduce the report with dotnet format --verify-no-changes using the shown namespace and blank lines, then inspect how the WHITESPACE diagnostic reports its line, column, and replacement text. Done means valid unchanged whitespace no longer produces misleading WHITESPACE errors or replacement instructions.
Written by the indexing model from the issue text.
Description
I used this: dotnet format --verify-no-changes on my project. It reported this:
C:\Source...\Handlers\HttpRequestHandler.cs(14,30): error WHITESPACE: Korrigieren Sie die Leerraumformatierung. Ersetzen Sie 4 Zeichen durch „\r\n\r\n“. [C:\Source...\MyProject.csproj]
The relevant code looks like this:
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
namespace MyProject.Handlers;
/// <summary>
/// Registers HTTP path routes and provides handlers for each route.
/// </summary>
internal class HttpRequestHandler : RoutingRequestHandler
{
The given line and column are at the end of the namespace line (namespace itself edited, column may not match in this example).
What?!
I shall replace 4 (non-existing) characters (probably just the existing 2 line breaks which are \r\n\r\n) with – \r\n\r\n. That is no change at all. Why is this reported? And the tool output is full of these. Looks severely broken, can't use this thing at all.
I learned from a dotnet blog post that I could use this command in my agent instructions, but I'd better not do that if I want results.
- 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
-
Documentation
Difficulty 1/5 1-3 hours Newbie friendliness 68/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 ·
-
type/automation type/performance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
bug cli
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100