Skip to content

Format C++ modules #7397

@metrapoliten

Description

@metrapoliten

Is your feature request related to a problem? Please describe.

xmake format doesn't format C++ modules files.

Describe the solution you'd like

As I understand it, to provide support, it is enough to add "c++.build.modules" here:

function _source_batch_should_format(sourcebatch)
local rulename = sourcebatch.rulename
local matched_rules = {"c.build", "c++.build", "cuda.build", "objc.build", "objc++.build"}
return table.contains(matched_rules, rulename)
end

If there's no reason not to do this, I'll provide a PR.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions