[clang] clang-format: Add -disable-format option (PR #137617)

2025-05-19 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: Right I get a feeling I'll have an easier time getting systemd to fully adapt clang-format than getting this into clang-format so closing https://github.com/llvm/llvm-project/pull/137617 ___ cfe-commits mailing list cfe-commits@list

[clang] clang-format: Add -disable-format option (PR #137617)

2025-05-19 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer closed https://github.com/llvm/llvm-project/pull/137617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Add -disable-format option (PR #137617)

2025-05-19 Thread via cfe-commits
mydeveloperday wrote: > then we should upgrade `DisableFormat` to a `struct` with the supported > exceptions as members. that in my view would be a minimum requirement, but honestly I don't like this feature. https://github.com/llvm/llvm-project/pull/137617 ___

[clang] clang-format: Add -disable-format option (PR #137617)

2025-05-19 Thread via cfe-commits
https://github.com/mydeveloperday commented: I think this is a slippery slope... I can't support this, I think it goes against the ethos of clang-format. I want to add features that support our users not those that don't want to use clang-format. https://github.com/llvm/llvm-project/pull/13

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Can't you just run the `llvm-include-order` clang-tidy check instead? > > Does that take `IncludeBlocks` and `IncludeCategories` from `.clang-format` > into account? I don't think so, but it shouldn't be impossible to teach clang-tidy. https://github.com/llvm/llvm-projec

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: > Can't you just run the `llvm-include-order` clang-tidy check instead? Does that take `IncludeBlocks` and `IncludeCategories` from `.clang-format` into account? https://github.com/llvm/llvm-project/pull/137617 ___ cfe-commits mail

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Can't you just run the `llvm-include-order` clang-tidy check instead? https://github.com/llvm/llvm-project/pull/137617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: I don't mind the exact interface too much tbh, I would just like to be able to run clang-format again to only sort includes without doing any other formatting. Happy to implement whatever makes folks happy. https://github.com/llvm/llvm-project/pull/137617 ___

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Owen Pan via cfe-commits
https://github.com/owenca requested changes to this pull request. This looks confusing. I would expect `-disable-format` to mean what it says. (But then why run clang-format?) If we allow turning on `SortIncludes` only, people will start asking for `QualifierAlignment` only, `IntegerLiteralSep

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137617 >From ab0fe63baf2044a4768835c359f7068dfba7d81d Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 28 Apr 2025 13:07:50 +0200 Subject: [PATCH] clang-format: Add -disable-format option When https://githu

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Björn Schäpers via cfe-commits
@@ -506,8 +512,11 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) { // Get new affected ranges after sorting `#includes`. Ranges = tooling::calculateRangesAfterReplacements(Replaces, Ranges); FormattingAttemptStatus Status; - Replacements

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137617 >From 00f2edbda351d0790f4f71aabaf59342cd6ce424 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 28 Apr 2025 13:07:50 +0200 Subject: [PATCH] clang-format: Add -disable-format option When https://githu

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137617 >From e4d8ac466061f098f399c9a662420da4acb5bb8b Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 28 Apr 2025 13:07:50 +0200 Subject: [PATCH] clang-format: Add -disable-format option When https://githu

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137617 >From 5a2912abe37c04e1ad15e282867e16f010ec1fe6 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 28 Apr 2025 13:07:50 +0200 Subject: [PATCH] clang-format: Add -disable-format option When https://githu

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137617 >From 10e997e7707f0d04b7c66da8ab4d85435dc2f8ba Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 28 Apr 2025 13:07:50 +0200 Subject: [PATCH] clang-format: Add -disable-format option When https://githu

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137617 >From b023d2698915ea7d269a9afe8f11de162a39e53d Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 28 Apr 2025 13:07:50 +0200 Subject: [PATCH] clang-format: Add -disable-format option When https://githu

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137617 >From 55b9af0981da56e777e10fd959edcc91c31f03f6 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 28 Apr 2025 13:07:50 +0200 Subject: [PATCH] clang-format: Add -disable-format option When https://githu

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137617 >From c7b25ee74e78a6ff6f0fc1fdf2cf0ea24381be89 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 28 Apr 2025 13:07:50 +0200 Subject: [PATCH] clang-format: Add -disable-format option When https://githu

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/tools/clang-format/ClangFormat.cpp ``

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Daan De Meyer (DaanDeMeyer) Changes When https://github.com/llvm/llvm-project/issues/27416 was fixed it became impossible to only use clang-format for include sorting. Let's introduce an option -disable-format to make it possible a

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer created https://github.com/llvm/llvm-project/pull/137617 When https://github.com/llvm/llvm-project/issues/27416 was fixed it became impossible to only use clang-format for include sorting. Let's introduce an option -disable-format to make it possible again to onl