<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/100974>100974</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
git-clang-format uses non-standard-style CLI options
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
magic-akari
</td>
</tr>
</table>
<pre>
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:
https://github.com/llvm/llvm-project/blob/73c72f2c6505d5bc8b47bb0420f6cba5b24270fe/clang/tools/clang-format/git-clang-format#L502
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.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlE-P4zYMxT-NciEcKPK_-ODDdGaDBtietkDPskzZamXJEOUE_vaFnKQ76WwH3SBIYIAmn977iZLIDA6xZeUvrHzbySWOPrSTHIzK5F8ymF3n-7U9g5ygxwtaPxs3QBwR_nj59htcMJDxDrwGZaUbMu3DJCNI10NEio_i169niKOMoPyEBFcTRzBxD8DEcYxxJpa_MHFi4jSYOC7dXvmJidNV0pTpKTJxet-eiYbxN8ZfzkzUFwR0yi8uYsAeDNHymJAmO-8yitL1MvSbDD9H4x3BgA6DjNhDt8JgYvY84RWuo1FjEjxbo2RE2vrNMlA61Ry8QqL9Tcjt9_d1Nkpau6bXn9vV9DRcBgSKYVFxSaIlgfbW-uvmw7uOrOL37_aYGfjsk8HZzVYqBOxNBJa_amOR5V8oCTIaaEZltMH-LjvLKK6p4o3lrxSDcQPLv3zo-g1TcH069la__6G4uwejITAEEn7g-mZrSkZCMtEijOs8ooOAc0BCtwEjgUYf4v2djSUJvV-6_6y33g338j386q94wZBm_e-8Qc4zygC90RoDumjXfyXxCaXWXh5_2Rz8n6gSsJ31HROnOle10EJVJS_7slPHrqi7jheC60p1suxEIWqu8YE4E6fovaUPyJ8-Mpp_Lbl4L_LsIN4YBGXNP6xa0wUZDG4YJIhZxe_JV_xhsyGg1Xm3Tn6535-tDLII2QqZhSyVf78ZoyToEF3Kyy9B4bYFvNPLthK0DzDhfte3ed_kjdxhe6iFEHnBC7Eb22OlywL7Uh8OuZSlPpbHvNG1rHuVN4fmuDOt4KLgtWh4JXgh9mWjdMUPstNV0xfHjhUcJ2nsPjm_92HYbZe_PXDe1MXOyg4tbatNiGfjRFp2od0S65aBWMGtoUjfO0UTLbYfMFkI6Wml3Gx8D9puCbb9aVpua4uJ0138pRV_BwAA__9XH9Gr">