You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are discrepancies in our codebase where the naming conventions do not align with the Zig standard guidelines for naming variables, functions, types, and file structures. Ensuring adherence to these standards will enhance code readability and maintainability.
Detailed Guidelines
Types: Names should be in TitleCase.
Exception: Structs with 0 fields, used as namespaces, should be in snake_case.
Callable Entities:
If the return type is a type, the name should be TitleCase.
For all other callable entities, use camelCaseFunctionName.
Variables: Use snake_case_variable_name.
Files:
Files representing types with top-level fields should use TitleCase.
Other files should follow snake_case.
Directories: Always use snake_case.
Exceptions
Follow established conventions (e.g., ENOENT) when they exist, even if they deviate from the above standards.
Action Items
Review the entire codebase to identify naming inconsistencies.
Update all non-conforming names to align with the Zig naming conventions.
Document any exceptions and the rationale for each.
Expected Impact
Improving the consistency of our naming conventions will:
Increase the readability of the code.
Simplify ongoing and future code maintenance.
Ensure our codebase adheres to community standards and practices.
Problem Description
There are discrepancies in our codebase where the naming conventions do not align with the Zig standard guidelines for naming variables, functions, types, and file structures. Ensuring adherence to these standards will enhance code readability and maintainability.
Detailed Guidelines
Types: Names should be in TitleCase.
Exception: Structs with 0 fields, used as namespaces, should be in snake_case.
Callable Entities:
If the return type is a type, the name should be TitleCase.
For all other callable entities, use camelCaseFunctionName.
Variables: Use snake_case_variable_name.
Files:
Files representing types with top-level fields should use TitleCase.
Other files should follow snake_case.
Directories: Always use snake_case.
Exceptions
Follow established conventions (e.g., ENOENT) when they exist, even if they deviate from the above standards.
Action Items
Review the entire codebase to identify naming inconsistencies.
Update all non-conforming names to align with the Zig naming conventions.
Document any exceptions and the rationale for each.
Expected Impact
Improving the consistency of our naming conventions will:
Increase the readability of the code.
Simplify ongoing and future code maintenance.
Ensure our codebase adheres to community standards and practices.
https://ziglang.org/documentation/0.12.0/#toc-Style-Guide
The text was updated successfully, but these errors were encountered: