i3 / i3lock

improved screen locker
https://i3wm.org/i3lock
BSD 3-Clause "New" or "Revised" License
920 stars 404 forks source link

"SortIncludes: false " for clang-format-10 #268

Closed wheelcomplex closed 4 years ago

wheelcomplex commented 4 years ago

set "SortIncludes: false " explicitly for clang-format-10

stapelberg commented 4 years ago

Thanks for your PR.

What’s the motivation for making this change? You’re only describing what you’re doing, not why.

wheelcomplex commented 4 years ago

Thanks for your PR.

What’s the motivation for making this change? You’re only describing what you’re doing, not why.

Oops, because clang-format-10 (default in Ubuntu 20.04, and clang-format-3.5 is not available) will re-sort includes (and break CI) without this.

Unfortunately SortIncludes is not supported by clang-format-3.5.

$ clang-format-3.5 -i *.[ch] && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false)
YAML:11:18: error: unknown key 'SortIncludes'
SortIncludes:    false
                 ^~~~~
stapelberg commented 4 years ago

We should probably just upgrade to a newer version, as we have already done for the i3 repository itself (clang-format-6.0).