Coding Style

General coding style policy for generated code: restrictive on comments, concise docstrings for modules and functions.

davidvujic cca96f5 835 B Updated

File contents

General coding style policy

Applies when writing or changing code, in any language.

Comments

  • Default: no comment. Naming and structure carry the meaning.
  • Comment only for a non-obvious why: a tradeoff, hazard, or surprising constraint in a very concise way.
  • No references to tickets, issues, or PRs.
  • No references to other parts of the codebase, other services or test code.
  • No restatements of the code, commented-out code, banners, or edit narration.
  • If a comment explains what the code does, rename or extract instead.

Docstrings

  • Do write them, for modules and for functions.
  • Keep them very concise: one line where possible, stating purpose.

davidvujic/my-eca-config/tree/main/skills/coding-style commit cca96f5049

Frequently asked questions

npx skillmds@latest add davidvujic/coding-style