feat: enforce lint checks as gate for commits and CI (#54)
All checks were successful
Deploy Feature Branch to Test / PHP Syntax Check (push) Successful in 34s
Deploy Feature Branch to Test / CSS Lint (stylelint) (push) Successful in 1m12s
Deploy Feature Branch to Test / HTML Lint (htmlhint) (push) Successful in 1m10s
Lint / PHP Syntax Check (push) Successful in 32s
Lint / CSS Lint (stylelint) (push) Successful in 1m14s
Lint / HTML Lint (htmlhint) (push) Successful in 1m9s
Lint / PHP Syntax Check (pull_request) Successful in 32s
Lint / CSS Lint (stylelint) (pull_request) Successful in 1m11s
Lint / HTML Lint (htmlhint) (pull_request) Successful in 1m9s
Deploy Feature Branch to Test / Deploy to Test Environment (push) Successful in 24s
All checks were successful
Deploy Feature Branch to Test / PHP Syntax Check (push) Successful in 34s
Deploy Feature Branch to Test / CSS Lint (stylelint) (push) Successful in 1m12s
Deploy Feature Branch to Test / HTML Lint (htmlhint) (push) Successful in 1m10s
Lint / PHP Syntax Check (push) Successful in 32s
Lint / CSS Lint (stylelint) (push) Successful in 1m14s
Lint / HTML Lint (htmlhint) (push) Successful in 1m9s
Lint / PHP Syntax Check (pull_request) Successful in 32s
Lint / CSS Lint (stylelint) (pull_request) Successful in 1m11s
Lint / HTML Lint (htmlhint) (pull_request) Successful in 1m9s
Deploy Feature Branch to Test / Deploy to Test Environment (push) Successful in 24s
- Add PHP syntax check to lint-staged via scripts/lint-php.sh - Add lint:php script to package.json - Update lint script to include PHP checks - Create scripts/safe-commit.sh for AI agent use - Update deploy-test.yml: lint jobs as gate before deploy - Add branch protection for main requiring status checks - Update AGENTS.md with pre-commit hook rules for agents Also addresses #53: CI requires lint checks before merge Co-authored-by: Claw <claw@openclaw.local>
This commit is contained in:
21
AGENTS.md
21
AGENTS.md
@@ -1,8 +1,27 @@
|
||||
# Agent-Richtlinien für dieses Projekt
|
||||
|
||||
## ⚠️ WICHTIG: Pre-Commit Hooks sind Pflicht
|
||||
|
||||
**Jeder Commit MUSS die Pre-Commit Lint-Checks durchlaufen. Niemals `--no-verify` verwenden!**
|
||||
|
||||
### Für AI-Agents (Claw etc.):
|
||||
- Verwende `./scripts/safe-commit.sh "Nachricht"` statt `git commit -m "..."`
|
||||
- Das Script garantiert dass lint-staged läuft (PHP, HTML, CSS, JS, Prettier)
|
||||
- Wenn ein Linter fehlschlägt: **Fehler beheben, nicht überspringen!**
|
||||
- Niemals `git commit --no-verify` verwenden
|
||||
|
||||
### Lint-Checks die laufen:
|
||||
- **PHP:** `php -l` Syntax-Check (via `scripts/lint-php.sh`)
|
||||
- **HTML:** htmlhint
|
||||
- **CSS:** stylelint + prettier
|
||||
- **JS:** eslint + prettier
|
||||
- **JSON/MD:** prettier
|
||||
|
||||
---
|
||||
|
||||
## Systemumgebung
|
||||
|
||||
- **Betriebssystem: Windows** – Alle Befehle und Pfade müssen Windows-kompatibel sein (z. B. Pfadtrennzeichen `\`, PowerShell-Syntax).
|
||||
- **Betriebssystem: Linux** – Befehle und Pfade sind Linux-kompatibel.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user