How can I comment a line in a .clang-tidy config file?
Asked Answered
B

2

5

Please help me to understand how can I comment out a single line from a clang-tidy configuration file.

Bautista answered 4/3, 2021 at 9:13 Comment(0)
B
8

# is acceptable

For example:

#-bugprone-macro-parentheses,

Bautista answered 4/3, 2021 at 16:31 Comment(2)
I think # is only valid at the start of the the lineLeander
see github.com/llvm/llvm-project/issues/64343Pancreatotomy
B
1

tl;dr: to comment a single line Prefix it with #.

The clang-tidy configuration file is a YAML file. This is documented in the output of clang-tidy --help as well as in the documentation.

So, syntax rules for YAML apply including syntax rules for comments.

Bullate answered 11/9, 2024 at 12:51 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.