[all-commits] [llvm/llvm-project] 6772c4: [libc++] Remove the ignore_format.txt file (#73135)

Louis Dionne via All-commits all-commits at lists.llvm.org
Wed Nov 22 12:21:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6772c4f2483204fd0bc28717fe63e009e07abaf5
      https://github.com/llvm/llvm-project/commit/6772c4f2483204fd0bc28717fe63e009e07abaf5
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-11-22 (Wed, 22 Nov 2023)

  Changed paths:
    M libcxx/utils/ci/run-buildbot
    R libcxx/utils/data/ignore_format.txt
    R libcxx/utils/generate_ignore_format.sh
    M llvm/utils/git/code-format-helper.py

  Log Message:
  -----------
  [libc++] Remove the ignore_format.txt file (#73135)

The ignore_format.txt file and the associated checks have been causing a
lot of confusion since we introduced them. Formatting becomes one of the
main hurdle for contributors (especially new contributors), and that is
not great.

The original goal of ignore_format.txt was to enforce clang-format only
in a subset of the files of the project. In practice, we have now
shifted to a model where we have a Github action that checks whether new
code surrounding edits is formatted. In that context, it probably
doesn't make sense to keep having a ignore list for formatting files.

After this patch, the clang-format job will enforce that all new code is
formatted properly, and that all edits to existing files are formatted
properly, regardless of which files the edits are in. This seems
reasonable and I believe will lead to much less confusion than our
current setup.

In the future, we could consider clang-formatting the whole code base
once and for all but this requires a bit of upfront technical work to
put in place a merge driver to help resolve merge conflicts across
formatting changes.




More information about the All-commits mailing list