Files
bookhoard/scripts/README.md
T
john-okeefe 12c6b41577 fix: exclude web/static/ from JS/CSS checks (compiled output)
Exclude web/static/ from verification checks:
- These are TypeScript compiled output files
- Already in .gitignore (web/static/*.js)
- Similar to node_modules/ - build artifacts, not source

Updated verify-quick.sh to exclude:
- web/static/*.js (TypeScript → JS compilation)
- web/static/*.css (TailwindCSS → CSS compilation)

Also removed ./bookhoard binary from repository.

Verification now shows only 1 error: 12 legacy templates with custom CSS.
Docs templates already comply (converted in Phase 4).
2026-02-02 10:00:26 -05:00

59 lines
1.7 KiB
Markdown

# Project Guidelines Verification
## Quick Start
Run the quick verification script:
```bash
make verify-guidelines
# or
./scripts/verify-quick.sh
```
## What It Checks
1. **Custom CSS**: Detects `<style>` tags in template files (should use TailwindCSS)
2. **JavaScript Files**: Finds .js files outside node_modules/ (should be TypeScript)
3. **Secrets**: Checks for .env, credentials.json in repository
4. **Build**: Verifies code compiles with `go build`
5. **Binaries**: Finds compiled binaries in repository (should build through containers)
## Understanding Results
-**PASS**: Guideline followed correctly
- ⚠️ **WARNING**: Minor issue, consider fixing
-**ERROR**: Critical violation, should fix before committing
## Exit Codes
- `0`: All checks passed (or only warnings)
- `1`: Errors found, fix before committing
## Pre-commit Hook Integration (Optional)
Add to `.git/hooks/pre-commit`:
```bash
#!/bin/bash
./scripts/verify-quick.sh
```
This will automatically check guidelines before every commit.
## CI/CD Integration
Add to your GitHub Actions or GitLab CI:
```yaml
- name: Verify Project Guidelines
run: make verify-guidelines
```
## Current Known Issues
The script will currently report:
- **12 templates with custom CSS** - These are legacy templates (admin, dashboard, analytics, etc.) that need TailwindCSS conversion. The docs templates were already converted in Phase 4.
**Excluded from checks:**
- `web/static/*.js` - TypeScript compiled output (excluded per .gitignore)
- `web/static/*.css` - TailwindCSS compiled output (excluded as build artifact)
**Status**: Only the 12 legacy templates remain non-compliant. All new work (docs, API explorer) uses TailwindCSS.