A lot of editors remove trailing whitespaces. This patch removes any trailing whitespaces and makes sure that no new ones are added.
Your review contains a change to ClangFormatStyleOptions.rst but not a change to clang/include/clang/Format/Format.h
ClangFormatStyleOptions.rst is auto generated from Format.h via clang/docs/tools/dump_format_style.py, please run this to regenerate the .rst
You can validate that the rst is valid by running.
./docs/tools/dump_format_style.py mkdir -p html /usr/bin/sphinx-build -n ./docs ./html
Something in here broke the Clang CI. See for example https://buildkite.com/llvm-project/libcxx-ci/builds/27050#0188fe23-c359-4a1d-8d10-f0fb966f142e.
It's actually interesting, now the libc++ CI is lightning fast since we're not sharing our resources anymore. I'll follow-up on that, I never expected it to make such a huge difference.
I believe it's the following line:
commands: - "! grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs || false"
buildkite-agent interpolates variables in commands and reacts to $, so it should be:
commands: - "! grep -rnI '[[:blank:]]$$' clang/lib clang/include clang/docs || false"
Instead (note $$).
It is possible to test this locally using the following commands:
$ ./libcxx/utils/ci/generate-buildkite-pipeline > 1.ym $ docker run -v `realpath 1.yml`:`realpath 1.yml` \ --rm buildkite/agent:3 pipeline upload --dry-run \ --agent-access-token xx `realpath 1.yml` 2023-06-30 14:36:35 INFO Reading pipeline config from "/home/eddy/work/llvm-project/1.yml" 2023-06-30 14:36:35 FATAL Pipeline parsing of "1.yml" failed (Expected identifier to start with a letter, got ')
The error is gone if '$$' change is applied. (But I have not tested if semantics of the command is preserved).