dotnet / dotnet/command-line-api

Location can't be both implicit and explicit

Offen
#2,437 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C#
Sterne
3.7k
Forks
428
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

The following code exists in the `Tokenizer.Tokenize` method:

```
var rootIsExplicit = FirstArgIsRootCommand(args, rootCommand, inferRootCommand);
var rootLocation = Location.CreateRoot(rootCommand.Name, rootIsExplicit, rootIsExplicit ? 0 : -1);
```

Keep in mind that rootIsExplicit specifies "Explicit".

The `Location.CreateRoot` method signature is as follows:

`internal static Location CreateRoot(string exeName, bool isImplicit, int start)`

Note that it is asking if the location is "Implicit".

There appears to be a discrepancy between whether the location is implicit or explicit.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem Vergleich der Behandlung von rootIsExplicit in Tokenizer.Tokenize mit dem Parameter isImplicit in Location.CreateRoot. Verfolge die daraus resultierende Semantik von Location und bestimme, ob der Parametername, das Argument oder verwandte Aufrufer inkonsistent ist; abgeschlossen ist die Aufgabe, wenn die Bedeutung von explizit/implizit eindeutig und konsistent ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.