Skip to content

Add code of conduct and coding standards - #19

Open
MattSzymonski wants to merge 1 commit into
mainfrom
project_documents
Open

Add code of conduct and coding standards#19
MattSzymonski wants to merge 1 commit into
mainfrom
project_documents

Conversation

@MattSzymonski

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread CODE-OF-CONDUCT.md
## 7. Maintain a Positive Community
This project exists to learn, build, and have fun. Help keep it welcoming and friendly.

## 8. Create Memes

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃槅

Comment thread CODING-STANDARDS.md
Comment thread CODING-STANDARDS.md
Comment thread CODING-STANDARDS.md
Comment thread CODING-STANDARDS.md
Comment thread CODING-STANDARDS.md
Comment thread CODING-STANDARDS.md

## 9. Logging & Observability
1. Use the contextual logging macros (`info!(ctx => ...)`, etc.) with a required `LogContext`, unless intentionally using "default".
2. Configure logging per context using strings like ecs = debug and follow consistent log-level semantics.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unclear to me - what do you mean by ecs = debug?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there is extremaly useful configurable logging system implemented in the engine but not documented anywhere properly. This line refers to it. I will document it.

Comment thread CODING-STANDARDS.md
1. Use the contextual logging macros (`info!(ctx => ...)`, etc.) with a required `LogContext`, unless intentionally using "default".
2. Configure logging per context using strings like ecs = debug and follow consistent log-level semantics.
3. Keep log messages clear and descriptive, avoiding abbreviations.
4. Use the project's Timer utility when measuring execution time for functions, subsystems, or critical paths.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Use the project's Timer utility when measuring execution time for functions, subsystems, or critical paths.
4. Use the project's `Timer` utility when measuring execution time for functions, subsystems, or critical paths.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, timer system has to be documented

Comment thread CODING-STANDARDS.md
Comment thread CODING-STANDARDS.md
2. Request feedback early for architectural changes.
3. Review for correctness, clarity, and idiomatic usage.

## 11. Version Control

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I would also be more specific - should we follow kernel guidelines? Use conventional commits? I would be for the latter as we enter a stage of bigger maturity of the project and once it is very mature it would make the commit bisection/triage easier when the commits are more self-descriptive.
Also what is our policy regarding commit squashing and merging/rebasing?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you propose something? I'm not that experienced in this

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion conventional commits are easy enough because one can see which part of the engine we are touching. Ideally it follows the folder/project structure. The website describes it quite nicely:

  • feat for a new feature
  • fix for a bugfix
  • BREAKING CHANGE or prepending the commit name with ! (although I would use something else here as ! is easy to ommit.
  • I used others in past like docs or infra to specify either documentation or infrastructure (in this case toolchain/core compilator/libs changes) we could also use ci
    Lastly I would expect to have, for example, such commits feat(zapping): Add zapping system that periodically flabbergast doodahs. Or we could do it by splitting per-system or subproject - but IMO that is too coarse-grained.

What do you think?

Comment thread CODING-STANDARDS.md
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

Successfully merging this pull request may close these issues.

3 participants