Skip to content
Snippets Groups Projects

Add build targets for source code formatting

Merged Sergey Kosukhin requested to merge add-format-targets into master
All threads resolved!

This makes it possible to run:

  • make format-fortran to format Fortran source files with fprettify;
  • make format-c to format C/C++ source files with clang-format;
  • make format that does both.

Although .clang-format is there, most (if not all) of the C/C++ source files in the repo are not formatted according to it. I don't want to mess with the authorship of the lines in git blame, so I leave it to the core developers to decide what to do about it.

If this is accepted, it should replace the existing logic in the CI, I guess.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Thank you very much for adding the format target. This is very useful.

  • Sergey Kosukhin added 1 commit

    added 1 commit

    Compare with previous version

  • Yen-Chen Chen resolved all threads

    resolved all threads

  • merged

  • Yen-Chen Chen mentioned in commit 1b6af435

    mentioned in commit 1b6af435

  • Author Maintainer

    @b382190 I would like to merge this before any other MR that I have submitted. So, please, merge this if it's fine with you and create a follow-up MR that reformats the files (it's up to you how to handle the authorship of the commits). After that, I will rebase the rest of the MRs and do the reformatting there.

    P.S. You already merged, thanks!

  • Yen-Chen Chen mentioned in merge request !28 (merged)

    mentioned in merge request !28 (merged)

  • Please register or sign in to reply
    Loading