WorldHealthOrganization/app

git pre-commit hooks + basic config

Offen

#1.671 geöffnet am 26.10.2020

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Dart (523 Forks)batch import
dev-workflowgood first issueideasource:team

Repository-Metriken

Stars
 (2.118 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Summary

Add basic pre-commit hooks to the repo. To catch, for example, broken symlinks (https://github.com/WorldHealthOrganization/app/pull/1670) Link: https://github.com/pre-commit/pre-commit-hooks

Possible config file. Should be run against every file in the existing tree to see what issues might come up.

# .pre-commit-config.yaml
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.3.0  # Use the ref you want to point at
    hooks:
    -   id: trailing-whitespace
    -   id: check-added-large-files
    -   id: check-case-conflict
    -   id: check-executables-have-shebangs
    -   id: check-json
    -   id: check-symlinks
    -   id: detect-private-key
    -   id: end-of-file-fixer

Checklist:

Contributor Guide