Coding standards

GDScript code

Popochiu adheres to the official GDScript style guide for both code and file and folder naming conventions.

To ensure your code complies with these guidelines, you can use the GDScript Toolkit by Pawel Lampe.

As of now, no automatic linting is available as a pre-commit hook or during PR submission. Please verify that your code is compliant before submitting your PRs.


Python code

Some scripts and automation, mostly related to the documentation, are written in Python.
We’re quite permissive when it comes to Python code, as it’s only used for secondary scripts and automation tasks, and the amount of code involved is minimal. However, when in doubt, it’s always a good idea to adhere to the PEP 8 style guide, which is the widely accepted standard for Python code.

To ensure your code aligns with PEP 8, you can rely on one of the many available linters such as Black, Flake8 or Pylint - or any other one you prefer.


Markdown Code

The Popochiu documentation is entirely written in Markdown, with several syntax extensions to support advanced functionality such as Mermaid diagrams, code highlighting, admonition blocks, definition lists, and more. These extensions are provided as Python modules included in the documentation Docker image.

For Markdown files, we adhere to CommonMark specification, augmented by the extensions provided by GitHub Flavored Markdown.

If you are using Visual Studio Code, we recommend installing the following extensions to ensure your Markdown code is properly reviewed during editing: