Skip to content

[Improvement] Improve code formatting #2613

Description

@EmilyBourne

What would you like to be improved?

Currently each printing class contains a _format_code method. This is often empty. For Fortran it contains lots of fiddly logic to ensure lines are not too long.

Do you have any suggestions for improvement? (Optional)

Instead of forcing the inclusion of the _format_code method even if it is empty it should be optional (default does nothing).

Instead of relying on fiddly code implementations, we should first look for common formatting tools.
E.g. fprettify for Fortran, clang-format for C/C++, black for Python. Alternatively the choice of formatting could be handled via plugins (see #2611) to explicitly activate a chosen format.

Record

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions