Skip to content

Formatting difficulties with clang-format #2746

Open
@bam241

Description

@bam241

I have the OpenMC formatting hook installed as well as clang-format.

Files were properly formatted (according to my clang-format), but CI was still complaining.

I think it is a version problem, (wasn't able to install clang-format15 as used in CI), I have clang-format 17.0.3 installed on my Mac and no easy way to install clang-format15 (and Brew doesn't offer it to me :( )
I had to manually guess how to modify my files to get CI happy.

if this is a clang-format version issue, I think one should to state the version followed by openMC.
Also maybe having the suggested format of the files in the CI artefacts could be useful ? (not fully convinced there because it would require some digging by user.)

The point here was just to raise the issue I faced, my local clang-format with the git hook not complaining and CI syntax checker complaining and the only information available was file and line with the issue in the detail of the syntax job.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions