No description
| .forgejo/workflows | ||
| Config | ||
| Guide | ||
| tests | ||
| Tools | ||
| .gitignore | ||
| README.md | ||
| task1.c | ||
| task2.c | ||
| test_task1.c | ||
| test_task2.c | ||
ISP Weekly Tasks Template
A Forgejo CI/CD integrated template with automated code quality validation for the ISP Style Guide.
Overview
This template includes:
- Automated CI/CD pipeline for code quality checks
- clang-format configuration for consistent code style
- Custom Python linter for ISP-specific validation rules
- Local testing tools (pre-commit hooks and manual check script)
- Comprehensive documentation and examples
Getting Started
Automatic Checking
Code is automatically checked on every push via the Forgejo CI/CD pipeline.
Local Pre-Commit Checks
pip install pre-commit
pre-commit install
git commit -m "Your message"
Manual Style Check
./Tools/check-style.sh
Documentation
All documentation is in the Guide/ directory:
| File | Purpose |
|---|---|
| Guide/QUICK_REFERENCE.md | Quick rules and commands |
| Guide/CI_CD_PIPELINE.md | Pipeline setup and integration |
| Guide/STYLE_GUIDE_SETUP.md | Detailed setup instructions |
| Guide/EXAMPLE_CODE.md | Code examples and patterns |
| Guide/styleguide.html | Complete style guide |
| Guide/README.md | Documentation overview |
| Guide/START_HERE.md | Getting started guide |
Configuration Files
| File | Purpose |
|---|---|
| Config/.clang-format | Code formatting rules |
| Config/.pre-commit-config.yaml | Pre-commit hook setup |
| .forgejo/workflows/lint.yml | CI/CD pipeline definition |
| Tools/style-guide-linter.py | Custom ISP linter (Python) |
| Tools/check-style.sh | Manual style check script |
Code Quality Checks
Format validation via clang-format:
- Indentation and spacing
- Brace placement
- Line length (max 100 characters)
- Code consistency
ISP Style Guide validation:
- File headers with author info
- Function documentation headers
- Operator spacing
- One statement per line
- Variable declaration consistency
- Pointer style consistency
- Switch/case formatting
- English-only comments
Setup Requirements
Required (auto-installed in CI/CD):
- clang-format
- python3
Optional (for local development):
Ubuntu/Debian:
sudo apt-get install clang-format
pip install pre-commit
macOS:
brew install clang-format
pip install pre-commit
CI/CD Pipeline
The Forgejo CI/CD pipeline automatically runs on:
- Push to main, master, develop branches
- Pull requests
- Changes to .c, .h files
View results in your Forgejo repository under Actions or Workflows.
Before Committing
- File has header comment with author
- Functions have documentation headers
- Spaces around binary operators
- One statement per line
- Variables declared individually
- Pointer style is consistent
- Switch cases properly formatted
- Comments are in English
- Run ./Tools/check-style.sh to verify
Tips
- Configure your editor to format on save
- Run ./Tools/check-style.sh before pushing
- Use clang-format -i file.c to auto-fix formatting
- Choose a consistent style and stick with it
- Read error messages carefully
Help
- Quick reference: Guide/QUICK_REFERENCE.md
- Code examples: Guide/EXAMPLE_CODE.md
- Troubleshooting: Guide/STYLE_GUIDE_SETUP.md
- Complete guide: Guide/styleguide.html
- Getting started: Guide/START_HERE.md
Notes
- All checks must pass before merging
- The pipeline runs on the server (Forgejo)
- Use --no-verify only for emergencies (not recommended)
- The custom linter validates ISP-specific requirements
Status: Ready to use Last Updated: October 2025 Framework: Forgejo CI/CD with GitHub Actions compatible workflows