[cfe-dev] Turn off lint pre-merge checks for test/

Nathan James via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 6 06:04:25 PDT 2020


Some of the test folders already have .clang-format files which just
override the column limit
----------------------------------------------------
BasedOnStyle: LLVM
ColumnLimit: 0
----------------------------------------------------
If the issues with formatting are just FileCheck comments being too
long, this is a probably the way to go.
If the issue with formatting is say trying to extract some kind of
diagnostic it may be wise to just wrap the bad code in `clang-format
on/off` comments.
Losing all formatting of test files would be a step backwards WDYT?

~Nathan

On Mon, 2020-07-06 at 13:55 +0100, MyDeveloper Day via cfe-dev wrote:
> Maybe it is time to add capability for a .clang-format-ignore file
> that can work across the tree, then those that want to turn them off
> could? 
> 
> There are some areas where the tests are already clean. It would be a
> shame to not keep them so, but I understand that FileCheck sometimes
> might need comments with length that don't meet the style guide
> 
> For now could you simply add a local .clang_format file in the test
> directory to turn clang-format off
> 
> e.g.
> --------------------------------------------------
> BasedOnStyle:LLVM
> DisableFormat: true
> --------------------------------------------------  
> 
> MyDeveloperDay
> 
> On Mon, Jul 6, 2020 at 1:47 PM Aaron Ballman via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
> > On Mon, Jul 6, 2020 at 8:39 AM Bruno Ricci via cfe-dev
> > <cfe-dev at lists.llvm.org> wrote:
> > >
> > > Would it be possible to turn off the lint pre-merge checks for
> > > the test/ folder? The suggestion to run clang-format on the tests
> > > is not useful and adds a lot of noise to the diff.
> > 
> > Strong +1. Same for running clang-tidy checks, etc.
> > 
> > ~Aaron
> > 
> > >
> > > Bruno Ricci
> > > _______________________________________________
> > > cfe-dev mailing list
> > > cfe-dev at lists.llvm.org
> > > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list