Skip to content

Apply consistent formatting of dREL code snippets #534

@vaitkus

Description

@vaitkus

Due to the limitations of the dictionary style guide, the dREL code that appears inside a loop had to be indented differently from the code that appears outside a loop. For example, see

_refln.a_calc:

              If (_diffrn_radiation.probe == "neutron")
                                              _units.code = "femtometres"
         Else If (_diffrn_radiation.probe == "electron")
                                              _units.code =  "volts"
         Else                                 _units.code =  "electrons"

and

_refln.a_calc_su:

         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"

The updated version of the guide now makes an exception for the _method.expression attribute to allow a more uniform formatting.

Note, that at the time of writing, the linter that is used in the GitHub check actions does not yet implement this exception (see issue jamesrhester/julia_cif_tools#13).

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