Skip to content

git-clang-format uses non-standard-style CLI options #100974

@magic-akari

Description

@magic-akari

I am developing the WASM version of clang-format and testing the CLI that comes with it. (https://github.com/wasm-fmt/clang-format)
I've encountered issues with the non-standard CLI options generated by git-clang-format, which complicates the parsing process.

Typically, clang-format's CLI options are structured as follows:

-i                             - Inplace edit <file>s, if specified.
--style=<string>               - Set coding style.

This is a standard CLI option, with a single hyphen representing a short option and a double hyphen representing a long option. However, CLI options generated by git-clang-format appear differently:

clang_format_cmd.extend(['-style='+style])

In typical cli parsing libraries, the -style option is synonymous with -s -t -y -l -e, which has been a source of confusion for me.

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