Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce zig styleguide #7

Open
hendriknielaender opened this issue May 4, 2024 · 0 comments
Open

Enforce zig styleguide #7

hendriknielaender opened this issue May 4, 2024 · 0 comments

Comments

@hendriknielaender
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant