Michael Kruse via llvm-dev
2020-Jul-01 17:13 UTC
[llvm-dev] [RFC] Semi-Automatic clang-format of files with low frequency
Am Mi., 1. Juli 2020 um 05:46 Uhr schrieb MyDeveloper Day via llvm-dev <llvm-dev at lists.llvm.org>:> I always knew "polly" was mostly clean too, and actually one of the areas I already test against, (along with lib/Format obviously).You have no other choice. Polly verifies its source formatting as part of check-polly, so every commit that violates formatting will get an email from the buildbot.It also triggers when clang-format itself changes. Did you find those helpful? The parts of Polly that are left out are its external dependencies, i.e. isl and imath. I wonder why these are even included in the clang-format status, we certainly do not want to modify these source files. For clang, I have to exclude the test folder because clang-format messes with clang -verify tests that require comments on specific lines and tests that check correct behavior of clang on whitespace. Michael
MyDeveloper Day via llvm-dev
2020-Jul-01 19:22 UTC
[llvm-dev] [RFC] Semi-Automatic clang-format of files with low frequency
We recently had a suggestion about introducing a .clang-format-ignore file, it seems there could be value in that for areas of which you don't want to ever format. Anyone undertaking a global clang-format without prior knowledge of the specific area wouldn't necessarily know that. MyDeveloperDay On Wed, Jul 1, 2020 at 6:14 PM Michael Kruse <llvmdev at meinersbur.de> wrote:> Am Mi., 1. Juli 2020 um 05:46 Uhr schrieb MyDeveloper Day via llvm-dev > <llvm-dev at lists.llvm.org>: > > I always knew "polly" was mostly clean too, and actually one of the > areas I already test against, (along with lib/Format obviously). > > You have no other choice. > Polly verifies its source formatting as part of check-polly, so every > commit that violates formatting will get an email from the buildbot.It > also triggers when clang-format itself changes. Did you find those > helpful? > > The parts of Polly that are left out are its external dependencies, > i.e. isl and imath. I wonder why these are even included in the > clang-format status, we certainly do not want to modify these source > files. > > For clang, I have to exclude the test folder because clang-format > messes with clang -verify tests that require comments on specific > lines and tests that check correct behavior of clang on whitespace. > > > Michael >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200701/4ba392d7/attachment.html>
Sam Elliott via llvm-dev
2020-Jul-01 19:31 UTC
[llvm-dev] [RFC] Semi-Automatic clang-format of files with low frequency
You can achieve the same as a `.clang-format-ignore` for vendored directories by putting a `.clang-format` in those directories which turns off formatting (IIRC, this takes two lines). What's more, this works with old versions of clang-format! Sam> On 1 Jul 2020, at 8:22 pm, MyDeveloper Day via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > We recently had a suggestion about introducing a .clang-format-ignore file, it seems there could be value in that for areas of which you don't want to ever format. > > Anyone undertaking a global clang-format without prior knowledge of the specific area wouldn't necessarily know that. > > MyDeveloperDay > > On Wed, Jul 1, 2020 at 6:14 PM Michael Kruse <llvmdev at meinersbur.de <mailto:llvmdev at meinersbur.de>> wrote: > Am Mi., 1. Juli 2020 um 05:46 Uhr schrieb MyDeveloper Day via llvm-dev > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>>: > > I always knew "polly" was mostly clean too, and actually one of the areas I already test against, (along with lib/Format obviously). > > You have no other choice. > Polly verifies its source formatting as part of check-polly, so every > commit that violates formatting will get an email from the buildbot.It > also triggers when clang-format itself changes. Did you find those > helpful? > > The parts of Polly that are left out are its external dependencies, > i.e. isl and imath. I wonder why these are even included in the > clang-format status, we certainly do not want to modify these source > files. > > For clang, I have to exclude the test folder because clang-format > messes with clang -verify tests that require comments on specific > lines and tests that check correct behavior of clang on whitespace. > > > Michael > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Sam Elliott Software Team Lead Senior Software Developer - LLVM and OpenTitan lowRISC CIC -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200701/1b38174e/attachment.html>