[all-commits] [llvm/llvm-project] fbf611: [clang-tidy] Extend spelling for CheckOptions
Nathan James via All-commits
all-commits at lists.llvm.org
Thu Jun 23 11:59:46 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fbf611ed2a768999202e2c5e1e1a6c3c6bb94725
https://github.com/llvm/llvm-project/commit/fbf611ed2a768999202e2c5e1e1a6c3c6bb94725
Author: Nathan James <n.james93 at hotmail.co.uk>
Date: 2022-06-23 (Thu, 23 Jun 2022)
Changed paths:
M clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
M clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
M clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
M clang-tools-extra/clangd/unittests/TidyProviderTests.cpp
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/docs/clang-tidy/Contributing.rst
M clang-tools-extra/docs/clang-tidy/index.rst
M clang-tools-extra/test/clang-tidy/checkers/google/module.cpp
A clang-tools-extra/test/clang-tidy/infrastructure/Inputs/config-files/4/key-dict/.clang-tidy
M clang-tools-extra/test/clang-tidy/infrastructure/config-files.cpp
Log Message:
-----------
[clang-tidy] Extend spelling for CheckOptions
The current way to specify CheckOptions is pretty verbose and unintuitive.
Given that the options are a dictionary it makes much more sense to treat them as such in the config files.
Example:
```
CheckOptions: {SomeCheck.Option: true, SomeCheck.OtherOption: 'ignore'}
# Or
CheckOptions:
SomeCheck.Option: true
SomeCheck.OtherOption: 'ignore'
```
This change will still handle the old syntax with no issue, ensuring we don't screw up users current config files.
The only observable differences are support for the new syntax and `-dump=config` will emit using the new syntax.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D128337
More information about the All-commits
mailing list