Dotfiles Testing & Validation
Primary Test Command
bash
bash ~/test-dotfiles.sh
This runs all checks: shell syntax, executable permissions, plist validation, ShellCheck analysis, documentation completeness, and common issues.
Individual Linters
Shell Scripts
bash
shellcheck *.sh # Lint all shell scripts shellcheck -S warning your-script.sh # With severity filter bash -n your-script.sh # Syntax check only
Markdown
bash
npx markdownlint-cli '**/*.md' --ignore node_modules npx markdownlint-cli README.md CLAUDE.md # Specific files
YAML
bash
yamllint -d relaxed .github/workflows/ci.yml
Plist (macOS)
bash
plutil -lint ~/Library/LaunchAgents/com.daily-maintenance.plist
Installing Linters
bash
# Python-based linters (fast install via uv) brew install uv uv tool install yamllint uv tool install beautysh --with setuptools # Node-based linters npm install -g markdownlint-cli # Shell linter brew install shellcheck
CI/CD Pipeline
GitHub Actions workflow at .github/workflows/ci.yml runs on every PR:
- •Shell Validation — ShellCheck and syntax checking
- •macOS Integration — Tests on multiple macOS versions
- •Security Scanning — Trivy and Trufflehog for secrets/vulnerabilities
- •Documentation — Validates README and markdown files
- •Compatibility Matrix — Tests on Ubuntu and macOS 12/13/14
Pre-commit Hook
Located at ~/.yadm/hooks/pre-commit. Runs validation automatically before
each yadm commit. To bypass in emergencies:
bash
yadm commit --no-verify -m "Emergency fix"
Debugging CI Failures
- •Check the Actions tab on GitHub for detailed logs
- •Run the specific failing check locally (see individual linters above)
- •Common fixes:
- •ShellCheck: Follow wiki links in error messages
- •Syntax errors: Check for missing quotes, brackets, semicolons
- •Plist errors: Validate XML structure with
plutil -lint