[PATCH] D30567: [clang-tidy] Fix treating non-space whitespaces in checks list.

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 9 02:55:54 PST 2017


curdeius added a comment.

Hi Alex and sorry for the late reply.

The main use case is a more readable `.clang-tidy` configuration checks.
Before this correction one can use something like this:

  ---
  Checks: '
      ,*,
      ,-cert-dcl03-c,
  '
  ...

It works, but is hardly comprehensible to a newbie (the strange use of addtional commas).
Since the spaces are ignored (since a recent commit of yours) we can remove the leading comma and hope that no user uses a tab...

After applying this patch, we can just write (with tabs or spaces and as many newlines as we want - used for grouping for instance):

  ---
  Checks: '
      *,
      -cert-dcl03-c,
  '
  ...

Additionaly, you can sometimes accidentally issue a tabulator on the command line and that's just nice to ignore it.


https://reviews.llvm.org/D30567





More information about the cfe-commits mailing list