PowerShell / PowerShell/PSScriptAnalyzer
Add a pre-commit hook for psscriptanalyzer
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 2.2k
- Forks
- 414
- Ø Merge
- 13 Std. 1 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
it would be quite useful if I could use thehttps://pre-commit.com/tool to run PSScriptAnalyzer on my powershell scripts during the git commit stage. then I could find problems in my powershell code before they land into git repositories.
information how about to write a pre-commit hook can be found at https://pre-commit.com/#new-hooks
Proposed technical implementation details (optional)
for example, a pre-commit hook for pylint (the python linter) is at https://github.com/pylint-dev/pylint
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Dokumentation zu pre-commit new-hooks und dem im Issue verlinkten Pylint-Hook-Beispiel. Ermittle, wie PSScriptAnalyzer als Hook für PowerShell-Skripte bereitgestellt werden sollte; abgeschlossen ist die Aufgabe, wenn pre-commit es während der Commits ausführen und Analyzer-Probleme melden kann, bevor der Code committed wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, powershell
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100