# gitlab clang format issues

**URL:** https://discourse.paraview.org/t/gitlab-clang-format-issues/874
**Category:** Development
**Created:** [November 9, 2018, 3:43pm UTC](https://discourse.paraview.org/t/gitlab-clang-format-issues/874 "2018-11-09T15:43:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Andy\_Bauer](https://discourse.paraview.org/user_avatar/discourse.paraview.org/andy_bauer/32/5442_2.png) [@Andy\_Bauer](https://discourse.paraview.org/u/Andy_Bauer)
#### Post date: [November 9, 2018, 3:43pm UTC](https://discourse.paraview.org/t/gitlab-clang-format-issues/874/1 "2018-11-09T15:43:42Z")

</div>

For [MR 2881](https://gitlab.kitware.com/paraview/paraview/merge_requests/2881) I have a multiline string of Python code in my C++ code that doesn’t pass the clang format check and thus is listed as an error which then won’t allow me to merge my commit. How can I get around that?

Note that when I used `Do: reformat` it munged up the code so that it didn’t compile.

Thanks,  
Andy

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [November 9, 2018, 3:47pm UTC](https://discourse.paraview.org/t/gitlab-clang-format-issues/874/2 "2018-11-09T15:47:24Z")

</div>

You can turn off clang formatting for a block of code by adding the comment `// clang-format off` and turn it on again with a `// clang-format on`.

---

<div class="post-metadata">

### Author: ![Andy\_Bauer](https://discourse.paraview.org/user_avatar/discourse.paraview.org/andy_bauer/32/5442_2.png) [@Andy\_Bauer](https://discourse.paraview.org/u/Andy_Bauer)
#### Post date: [November 9, 2018, 3:59pm UTC](https://discourse.paraview.org/t/gitlab-clang-format-issues/874/3 "2018-11-09T15:59:17Z")

</div>

That fixed it – thanks!
