Skip to content

Introduce lightweight style guide #2628

@netrome

Description

@netrome

Background

I have a lot of style opinions which most seem to agree makes the code a bit nicer, but I don't want to pollute reviews or repeat these time and time again in comments. Therefore it would be nice to maintain a STYLE.md file with some basics like:

  • Preserve namespacing for types/functions/macros with common names, e.g. thiserror::Error > Error, anyhow::Error > Error, tracing::info!() > info!() etc.
  • Always preserve namespaces for functions.
  • Organize types/functions after occurrence (e.g. if A references B, A should be declared before B).

User Story

As a developer I like well-defined style guides to make the code easier to read and understand.

Acceptance Criteria

  • We've added a STYLE.md file with basic style guides.
  • LLMs are prompted to follow these.

Resources & Additional Notes

This is a small style guide I've used for a personal side project which has been pretty useful: https://github.com/netrome/magent/blob/main/docs/STYLE.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions