Skip to content

Commit

Permalink
Update coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Nov 30, 2024
1 parent 14fc89e commit 1657f9b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions doc/coding_standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,23 @@ standards:
[1, 2, 3]
{'name': 'Fabien'}
* Do not put any spaces before and after ``=`` in macro argument declarations:
* Put exactly one space before and after ``=`` in macro argument declarations:

.. code-block:: twig
{% macro html_input(class="input") %}
{% macro html_input(class = "input") %}
* Put exactly one space after the ``:`` sign in macro argument declarations:
* Do not put any spaces before and after ``=`` sign when using named arguments:

.. code-block:: twig
{% macro html_input(class: "input") %}
{% html_input(class="input") %}
* Put exactly one space after the ``:`` sign when using named arguments:

.. code-block:: twig
{% html_input(class: "input") %}
* Use snake case for all variable names (provided by the application and
created in templates), function/filter/test names, argument names and named
Expand Down

0 comments on commit 1657f9b

Please sign in to comment.