Skip to content

clang-tidy CheckOptions "Not a sequence" Error #3030

@MasonWilie

Description

@MasonWilie

Describe the bug

clang-tidy is producing the warning

.clang-tidy:80:16: error: not a sequence
CheckOptions: {}

Expected behavior

clang-tidy should not be producing any warnings

Reproduction steps

$ git clone https://github.com/catchorg/Catch2.git
$ cd Catch2/
$ clang-tidy src/catch2/**

Output

...
/workspace/test/Catch2/.clang-tidy:81:16: error: not a sequence
CheckOptions: {}
               ^
Error parsing /workspace/test/Catch2/.clang-tidy: Invalid argument
/workspace/test/Catch2/.clang-tidy:81:16: error: not a sequence
CheckOptions: {}
               ^
Error parsing /workspace/test/Catch2/.clang-tidy: Invalid argument
/workspace/test/Catch2/.clang-tidy:81:16: error: not a sequence
CheckOptions: {}
               ^
Error parsing /workspace/test/Catch2/.clang-tidy: Invalid argument
Error while processing /workspace/test/Catch2/src/catch2/benchmark.
/workspace/test/Catch2/.clang-tidy:81:16: error: not a sequence
CheckOptions: {}
               ^
Error parsing /workspace/test/Catch2/.clang-tidy: Invalid argument
/workspace/test/Catch2/.clang-tidy:81:16: error: not a sequence
CheckOptions: {}
               ^
...

Platform information:

  • OS: Ubuntu 20.04.2
  • Compiler+version: clang version 13.0.0
  • Catch version: trunk

Additional context
The "CheckOptions" value should be a list of key-value pairs, for example

CheckOptions:
    - key: bugprone-argument-comment.StrictMode
      value: 1
    - key: bugprone-exception-escape.FunctionsThatShouldNotThrow
      value: WinMain,SDL_main

Source: https://stackoverflow.com/questions/70081393/clang-tidy-config-format

So this should instead be

CheckOptions: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    DevelopmentIssues related to further development of Catch2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions