[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 01:41:27 PST 2020


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h:38
+/// extensions.
+inline StringRef defaultHeaderFileExtensions() { return ",h,hh,hpp,hxx"; }
+
----------------
lebedev.ri wrote:
> njames93 wrote:
> > A lot of configuration options for clang tidy use semi-colon `;` seperated lists. Would it not be wise to carry on the convention and use semi colon here (and below) as well. It could break a few peoples configuration but that would be realised  fairly quickly and updated
> I think i'm missing the point of D75621.
> Why can't we keep using `,` as delimitter?
> Why do we have to change everything, introduce inconsistency
> (is it still documented that `,` is still valid?),
> and spam into terminal if `,` is found?
This reason
```
➜  ~ clang-tidy test.cpp --config="{CheckOptions: [{ key: HeaderFileExtensions, value: h,,hpp,hxx }]}" -- -std=c++17
YAML:1:59: error: unknown key 'hpp'
{CheckOptions: [{ key: HeaderFileExtensions, value: h,,hpp,hxx }]}
                                                          ^
Error: invalid configuration specified.
Invalid argument
➜  ~ clang-tidy test.cpp --config="{CheckOptions: [{ key: HeaderFileExtensions, value: h;;hpp;hxx }]}" -- -std=c++17
➜  ~ 

```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74669/new/

https://reviews.llvm.org/D74669





More information about the cfe-commits mailing list