# loki.transformations.sanitise

Sub-package with assorted utility `Transformation` classes to harmonize the look-and-feel of input source code.

Classes

`SanitiseTransformation`([...]) | `Transformation` object to apply several code sanitisation steps when batch-processing large source trees via the `Scheduler`.

class SanitiseTransformation(resolve_associate_mappings=True, resolve_sequence_association=False)

  Bases: `Transformation`

  `Transformation` object to apply several code sanitisation steps when batch-processing large source trees via the `Scheduler`.

  Parameters:

    - resolve_associate_mappings (bool) – Resolve ASSOCIATE mappings in body of processed subroutines; default: True.

    - resolve_sequence_association (bool) – Replace scalars that are passed to array arguments with array ranges; default: False.

  transform_subroutine(routine, **kwargs)

    Defines the transformation to apply to `Subroutine` items.

    For transformations that modify `Subroutine` objects, this method should be implemented. It gets called via the dispatch method `apply()`.

    Parameters:

      - routine (`Subroutine`) – The subroutine to be transformed.

      - **kwargs (optional) – Keyword arguments for the transformation.

Modules

`associates` | A small selection of utility transformations that resolve certain code constructs to unify code structure and make reasoning about Fortran code easier.
`sequence_associations` |
`substitute` |
`tests` |