Welcome to the C code standards guide for our open-source project! 🧰📝 These guidelines aim to ensure consistency, readability, and maintainability across all C code contributions.
Key Principles
- Naming Conventions: Use descriptive names with underscores (e.g.,
variable_name
). ⚙️ - Formatting Rules: Indent with 4 spaces, limit line length to 80 characters. 📐
- Comments & Documentation: Always document public APIs and complex logic. 📖
Best Practices
- Follow POSIX standards for system calls and file operations. 🌍
- Use
const
for function parameters that shouldn't be modified. 🔄 - Enable
-Wall -Wextra
flags during compilation. 🔧
For more details on project structure, check our OSS Project Structure Standards. 📁