Files
semantica/scripts/check-code.sh
T
KaifAhmad1 03b84ab238 docs: Add comprehensive open source project improvements
- Add essential open source files (CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, CHANGELOG.md, CONTRIBUTORS.md)
- Add GitHub issue and PR templates
- Add CI/CD workflows (CI, docs, release, dependabot)
- Add pre-commit hooks configuration
- Add documentation enhancements (architecture, governance, contributing, community)
- Add developer experience scripts (setup-dev, run-tests, format-code, check-code)
- Add community features (SUPPORT.md, .all-contributorsrc)
- Enhance README badges and project metadata
- Update mkdocs.yml navigation structure
2025-11-24 13:30:49 +05:30

32 lines
892 B
Bash

#!/bin/bash
# Code quality check script for Semantica
set -e
echo "🔍 Running code quality checks..."
# Activate virtual environment if it exists
if [ -d "venv" ]; then
source venv/bin/activate
fi
# Check formatting
echo "Checking code formatting (black)..."
black --check semantica/ tests/ || { echo "❌ Code formatting issues found. Run: black semantica/ tests/"; exit 1; }
# Check import sorting
echo "Checking import sorting (isort)..."
isort --check-only semantica/ tests/ || { echo "❌ Import sorting issues found. Run: isort semantica/ tests/"; exit 1; }
# Lint with flake8
echo "Linting with flake8..."
flake8 semantica/ tests/ || { echo "❌ Linting issues found."; exit 1; }
# Type check with mypy
echo "Type checking with mypy..."
mypy semantica/ || { echo "⚠️ Type checking issues found (non-blocking)."; }
echo ""
echo "✅ All code quality checks passed!"