github / github/gh-classroom

Linting fails after forking and cloning

Offen
#96 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
126
Forks
21
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I was going to fix the error in CONTRIBUTING.md I mentioned in Issue #95. The `golangci-lint run` command results in the following...

> gh-classroom on  main via 🐹 v1.23.6 took 18s
❯ `golangci-lint run`
pkg/classroom/classroom.go:144:21: printf: non-constant format string in call to fmt.Sprintf (govet)
return fmt.Sprintf(a.Classroom.Url)

## Context
### Platform
MacOS
Also replicated it on CachyOS Linux (Arch based distro)
### Submitting a pull request
1. [Fork](https://github.com/github/gh-classroom/fork) and clone the repository
2. Configure and install the dependencies: `go mod tidy`
3. Make sure the tests pass on your machine: `go test -v ./...`
4. Make sure linter passes on your machine: `golangci-lint run` <----- This line causes the error
5. Create a new branch: `git checkout -b my-branch-name`
6. Make your change, add tests, and make sure the tests and linter still pass
7. Push to your fork and [submit a pull request](https://github.com/github/gh-classroom/compare)
8. Please be patient while waiting for your pull request to be reviewed and merged.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne bei pkg/classroom/classroom.go:144, wo der gemeldete govet-Fehler im fmt.Sprintf-Aufruf auftritt. Führe golangci-lint run und go test -v ./... vor und nach der Änderung aus; abgeschlossen ist die Änderung, wenn der Lint-Fehler behoben ist und die Testsuite weiterhin erfolgreich durchläuft.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
go
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
58/100

Neue Issues direkt in Ihr Postfach

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