[cfe-dev] Correct .clang-tidy syntax

Manuel Klimek klimek at google.com
Tue Dec 2 23:47:02 PST 2014


On Wed, Dec 3, 2014, 00:49 Szabolcs Sipos <labuwx at balfug.com> wrote:

> Hi!
>
> I've been trying to use a .clang-tidy config file to pass parameters to
> my checker, but have had no success
>
> When I use the following syntax: (-> I found it here:
> http://clang.llvm.org/extra/clang-tidy.html#configuring-checks)
> CheckOptions: {
>   - key: my-check.SomeOption1
>     value: 123
>   - key: my-check.SomeOption2
>     value: 'some other value'
> }
>
> I get this error message:
> YAML:2:4: error: Unexpected token. Expected Key, Flow Entry, or Flow
> Mapping End.
>   - key: my-check.SomeOption1
>    ^
>
> I tried removing the whitespace the arrow points to -> same error,
> different location (before 123) -> whitespace removed -> a different error:
> YAML:3:10: error: Found unexpected ':' while scanning a plain scalar
>     value:123
>          ^
>
> At this point I have no idea what to do. Can you spot the error?
>
> Thanks
> --
> Szabolcs Sipos
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141203/5bd439f5/attachment.html>


More information about the cfe-dev mailing list