Skip to content

[clang-tidy] Add support comments in config file for WarningsAsErrors #171792

@fekir

Description

@fekir

This issue is related to #64343

I see that, for example

Checks: [
  -*,
  ,-abseil-string-find-str-contains # no abseil, use std::string::contains
]

is supported, but

WarningsAsErrors: [
  -*,
  ,-abseil-string-find-str-contains # no abseil, use std::string::contains
]

does not seem to be supported; I get errors similar to the following

clang-tidy --verify-config
/home/user/.clang-tidy: error: unexpected scalar                                                                                                           -*                                                                                                                                                                        ^
Error parsing /home/user/.clang-tidy: Invalid argument

It would be nice if Checks and WarningsAsErrors would support the same syntax, and in particular being able to put comments between entries, like it is in Checks.

Metadata

Metadata

Assignees

Labels

clang-tidyenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions