<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/111770>111770</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format: Override ColumnLimit option on file by file bases.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dehinrsu
</td>
</tr>
</table>
<pre>
It is hard to get the correct ColumnLimit value which best suits all the files in the project.
Along with the global ColumnLimit option (which applies for the entire project), a pragma for a local and custom ColumnLimit (which applies to that file only) will be useful.
// clang-format ColumnLimit 150
or
// clang-format ColumnLimitLocal 150
or
// clang-format ColumnLimitFile 150
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUktGOozwMhZ8m3FhTBVNacpGL-WeE9Esj7TMEMJCVIShxOurbr0qr2a12L3ZvsJD8-Rw7x6Xkp5XIqvo_Vb8XLsscoh1o9mtMuejCcLX_C_gEs4sDSICJBGQm6EOM1Au8Bc7L-uEXL3BxnAk-Z9_P0FESSNlLAse8I6NnSuDX_WeL4Tv1clD6XenX-_eVwzrBp5d5b5k4dI6fFMImPqygsLmruG1jTwnGEHeEVvHxa7hCo_ANHGzRTYvbuxxw6B2DWwfoc5KwPAn8NlkCyOxkNw9h5atCA5-eGTqCnGjM_LSDwlZhCz27dXoZQ1zc843KWt8bQ_wr4GN3-69Ue3Nb1roYbDWYyriCbHnGpi7RNLqYraamH0fszRlP5jQYg6cGB02mcf2xrqnwFjUeS60NIprKHCpT66Yc8HSssDF6VEdNi_N8YL4shxCnwqeUyZZleT7rgl1HnPZgIf5qUyHeohbtjXvp8pTUUbNPkn5OEi9M9omqXuHbhWL0A_0pEWG9v1B3fVSXKB2KHNnOIltS1eNkk5c5d4c-LArbm-CjvHxlpt33SArbxyoXiz8CAAD___j1CWg">