Skip to content

Commit 6772c4f

Browse files
authored
[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.
1 parent a9c149d commit 6772c4f

File tree

4 files changed

+1
-7339
lines changed

4 files changed

+1
-7339
lines changed

libcxx/utils/ci/run-buildbot

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -231,20 +231,6 @@ check-generated-output)
231231
false
232232
fi
233233

234-
echo "+++ Making sure libcxx/utils/data/ignore_format.txt was updated appropriately"
235-
cp ${MONOREPO_ROOT}/libcxx/utils/data/ignore_format.txt ${BUILD_DIR}/before.txt
236-
${MONOREPO_ROOT}/libcxx/utils/generate_ignore_format.sh
237-
diff ${BUILD_DIR}/before.txt ${MONOREPO_ROOT}/libcxx/utils/data/ignore_format.txt | tee ${BUILD_DIR}/ignore_format.diff || true
238-
if [ -s ${BUILD_DIR}/ignore_format.diff ]; then
239-
echo "It looks like the list of not formatted files has changed."
240-
echo "If a file is now properly formatted with clang-format, remove the file name from "
241-
echo "libcxx/utils/data/ignore_format.txt. Otherwise you have to fix the"
242-
echo "formatting of some of the changed files. The diff above represents the "
243-
echo "changes that would be needed to ignore_format.txt to keep it representative "
244-
echo "of which files are mis-formatted in the project."
245-
false
246-
fi
247-
248234
# Reject patches that introduce non-ASCII characters or hard tabs.
249235
# Depends on LC_COLLATE set at the top of this script.
250236
set -x

0 commit comments

Comments
 (0)