Skip to content

error WHITESPACE is an invalid report #2299

Description

@ygoe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions