Commit Graph

5 Commits

Author SHA1 Message Date
Wyatt Hepler
bc292b9152 pw_presubmit: Rename format_cc to format_code
- Rename format_cc.py to format_code.py to make it language-agnostic.
- Exclude non-existing paths in the presubmit to handle deletions.

Change-Id: If07decfd9fe11539bd5ccc74243f00cbf33736b8
2019-12-04 23:50:19 +00:00
Wyatt Hepler
f2278ee6b0 presubmit: Fix invoking script directly
Change-Id: I1dff5a6d91335ecf7213b0c3f9e511cc067318ef
2019-12-03 17:06:14 +00:00
Wyatt Hepler
3767c3a5b2 Script for installing a presubmit pre-push hook
- The install_hook.py script installs a simple presubmit hook that wraps
  another command.
- Add an --install option to Pigweed's presubmit that installs the
  commit hook and exits.

Change-Id: I1b9296b103e0b94e1ff44cc5b274590f56f72831
2019-12-02 14:26:14 -08:00
Wyatt Hepler
c426bdc032 pw_presubmit: Improve final summary
List total, passed, failed, and skipped presubmit checks.

Example:
╔════════╦═══════════════════════════════════════════════════╦════════╗
║ FAILED ║ 14 checks: 8 passed, 1 failed, 5 skipped          ║ 0:01.9 ║
╚════════╩═══════════════════════════════════════════════════╩════════╝

Change-Id: Icccc718ebd194acad1760dadb9f76f81995103ed
2019-12-02 14:25:58 -08:00
Wyatt Hepler
c18f4b28d7 presubmit: Make pw_presubmit a package and plugin
- Organize pw_presubmit as a Python package.
- Move presubmit.py to into the package as pigweed_presubmit.py.
- Set up pigweed_presubmit.py to run whether the pw_presubmit package is
  installed or not.

Change-Id: Id85937971d554332ab7d4adfd668eeafa6379976
2019-12-02 22:00:40 +00:00