FS3886: This list expression contains a single tuple element. This warning is too trigger happy

Offen
#20,962 3 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
57/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
fsharp
Bereich
compilers

Rechercherichtung

Start by locating the implementation and tests for warning FS3886 in the F# compiler; the issue does not name specific files. Check how the warning determines whether a single tuple element was likely intended as multiple list elements, then add coverage for elements with different types and for elements with the same type. Done when the warning is suppressed for the shown mixed-type tuple and retained when the elements have the same type.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Feature Request
let a =
  [
    1,"a"
  ]

Did you mean to use ';' instead of ',' to separate list elements?

The warning doesn't make sense when the list elements aren't of the same type.

I would like the warning to be given only if the elements are of the same type.

Vorherrschende Sprache
F#
Sterne
4.3k
Forks
883
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
80

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus dotnet/fsharp

Alle Issues in dotnet/fsharp

Ähnliche Issues

Weitere Issues zu Compilers

Neue Issues direkt in Ihr Postfach

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