clang-format: do not sort include calls #14713

pull 1Il1 wants to merge 1 commits into bitcoin:master from 1Il1:patch-2 changing 1 files +1 −0
  1. 1Il1 commented at 7:41 AM on November 13, 2018: contributor

    The SortIncludes flag in clang-format will not correctly identify main header file includes in sources (probably due to usage of brackets and full paths).

    This results in broken code, if clang-format is applied to e.g.

    https://github.com/bitcoin/bitcoin/blob/47ed24cf8aa7be3b778731b1f140ad9941157933/src/qt/test/wallettests.cpp#L1-L2

    which will reorder the two includes alphabetically (u < w), and the util.h include will then fail to compile due to missing QString definition.

  2. clang-format: do not sort include calls 94579596d4
  3. 1Il1 commented at 8:37 AM on November 13, 2018: contributor

    The IncludeIsMainRegex (std::string) (https://clang.llvm.org/docs/ClangFormatStyleOptions.html) option seems to be a better solution to the issue here, so closing this PR.

  4. 1Il1 closed this on Nov 13, 2018

  5. 1Il1 deleted the branch on Nov 13, 2018
  6. laanwj referenced this in commit c51e1516a9 on Nov 13, 2018
  7. fanquake locked this on Nov 18, 2018

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me