Format the code with rustfmt and check formatting and lints in CI

Offen Anfängerfreundlich
#12 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
88/100
Issue-Typ
Refactoring
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
github-actions, markdown, rust
Bereich
devtools

Rechercherichtung

Beginne damit, cargo fmt --all auszuführen und diese Änderung allein zu committen, und prüfe dann, dass cargo fmt --all --check nichts meldet. Bearbeite danach .github/workflows/ci.yml und füge die fmt- und clippy-Schritte vor Test hinzu, wobei dem Schritt dtolnay/rust-toolchain@stable components: rustfmt, clippy hinzugefügt wird. Füge schließlich eine Zeile in CONTRIBUTING.md hinzu. Fertig ist es, wenn beide cargo-Befehle lokal und in CI erfolgreich laufen, ohne Verhaltensänderungen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement good first issue

The Rust code isn't run through rustfmt yet, so contributors who format their changes get unrelated diffs in other files. cargo fmt --all --check currently reports differences in 14 files. cargo clippy --workspace --all-targets is already clean, but nothing keeps it that way.

This is a good first contribution: no Windows API knowledge needed.

What to do

  1. Run cargo fmt --all and commit the result on its own, with no other changes, so it is easy to review.

  2. In .github/workflows/ci.yml, add two steps before Test:

    • cargo fmt --all --check
    • cargo clippy --workspace --all-targets -- -D warnings

    dtolnay/rust-toolchain@stable needs components: rustfmt, clippy for these to work.

  3. Mention in CONTRIBUTING.md that contributors should run cargo fmt --all before opening a pull request.

Done when

  • cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings both pass locally and in CI.
  • No code behaviour changes.
Vorherrschende Sprache
Rust
Sterne
7
Forks
1
Ø Merge
6 Std. 34 Min.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

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 CodingRule/Hidely

Alle Issues in CodingRule/Hidely

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

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