Fix test fixture, README provenance and remaining Windows-only polish

Offen Anfängerfreundlich
#13 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
62/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
go
Bereich
devtools

Rechercherichtung

Beginne mit dem Fixture TestCompareWindowsOnly in plugin/scripts/godebugdiff_test.go, wo winreadlinkvolume als Changed: 26 erwartet wird, obwohl es 23 sein sollte. Reproduziere Punkt 1, indem du c.WindowsOnly = isWindowsOnly(k) in compare() auskommentierst, und prüfe die URL in der Fehlermeldung. Fertig ist es, wenn das Fixture 23 mit der URL #go-123 prüft und Before, After und Package kontrolliert, und examples/README.md an einer Stelle angibt, welche Toolchain für jede Datei gilt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Follow-up from #12:

  1. TestCompareWindowsOnly (plugin/scripts/godebugdiff_test.go) gives winreadlinkvolume Changed: 26. The real value is 23, so the change gets the URL go.dev/doc/godebug#go-126 instead of #go-123. To reproduce: comment out c.WindowsOnly = isWindowsOnly(k) in compare() and run the test; the failure message prints URL:https://go.dev/doc/godebug#go-126. Use 23. The test also ignores the second value compare() returns and never checks Before, After or Package. Asserting them costs nothing.
  2. The WindowsOnly field comment now says "Windows-specific setting", but isWindowsOnly only checks the "win" name prefix. Make the comment match the rule, or derive the mark from an explicit list.
  3. examples/README.md line 12 still says the real outputs were made with Go 1.27.3, and the new line 24 says cobra.txt was redone with Go 1.27.4. Put the toolchain for each file in one place, for example a column in the table.
  4. Item 3 of #11 is still open, although #12 closes #11: the "No binary imports the package, so no effect" section still adds "(Windows only)". To reproduce: run from 1.22 to 1.23 on a module whose only binary is an empty func main() {}. Also, windowsOnly still uses omitempty while goCommand is always emitted, and the report does not tell Linux-only services that they can ignore the pins for Windows-only settings.

GillMacedo

Vorherrschende Sprache
Go
Sterne
0
Forks
3
Ø Merge
4 Std. 55 Min.
Gemergte PRs (30 T.)
4

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 GillMacedo/godebugdiff

Alle Issues in GillMacedo/godebugdiff

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

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