mirror of
https://github.com/trailofbits/algo.git
synced 2026-08-17 21:25:50 +02:00
* Add comprehensive pre-commit hooks for code quality - Set up pre-commit framework with hooks for Python, YAML, Ansible, and shell - Configure ruff for Python linting and formatting - Add yamllint for YAML validation - Include ansible-lint and syntax checks - Add shellcheck for shell scripts - Create development documentation - Auto-fix trailing whitespace and file endings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove redundant DEVELOPMENT.md and update CONTRIBUTING.md - Removed docs/DEVELOPMENT.md as it was redundant with existing documentation - Added pre-commit hooks setup instruction to CONTRIBUTING.md for contributors - Consolidated development guidance into a single location 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
26 lines
694 B
Bash
Executable File
26 lines
694 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Run the same linting as CI
|
|
echo "Running ansible-lint..."
|
|
ansible-lint .
|
|
|
|
echo "Running playbook dry-run check..."
|
|
# Test main playbook logic without making changes - catches runtime issues
|
|
ansible-playbook main.yml --check --connection=local \
|
|
-e "server_ip=test" \
|
|
-e "server_name=ci-test" \
|
|
-e "IP_subject_alt_name=192.168.1.1" \
|
|
|| echo "Dry-run completed with issues - check output above"
|
|
|
|
echo "Running yamllint..."
|
|
yamllint -c .yamllint .
|
|
|
|
echo "Running ruff..."
|
|
ruff check . || true # Start with warnings only
|
|
|
|
echo "Running shellcheck..."
|
|
find . -type f -name "*.sh" -not -path "./.git/*" -exec shellcheck {} \;
|
|
|
|
echo "All linting completed!"
|