https://github.com/tomdevisser/codeguard
A lightweight hook system for enforcing code quality at commit and push time.
https://github.com/tomdevisser/codeguard
Last synced: 10 months ago
JSON representation
A lightweight hook system for enforcing code quality at commit and push time.
- Host: GitHub
- URL: https://github.com/tomdevisser/codeguard
- Owner: tomdevisser
- Created: 2025-04-22T11:39:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-25T10:36:26.000Z (about 1 year ago)
- Last Synced: 2025-08-23T22:16:30.238Z (10 months ago)
- Language: Shell
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Codeguard
## About
A lightweight hook system for enforcing code quality at commit and push time.
## Current checks
- PHPCS (based on WPCS) for all PHP files;
- Prettier for all JavaScript files;
- Commit message should be at least 20 characters;
- Commit message should start with one of the defined prefixes;
## Sample output
```zsh
> codeguard@1.0.0 prettier
> prettier --check **/*.js
Checking formatting...
All matched files use Prettier code style!
🟢 Prettier check is successful.
> codeguard@1.0.0 phpcs
> vendor/bin/phpcs --standard=phpcs.xml
🟢 PHPCS check is successful.
> codeguard@1.0.0 eslint
> eslint .
🟢 ESLint check is successful.
🟢 Commit message has the correct prefix.
🟢 Commit message has the required minimum length.
```