summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/clangdiagnosticconfig.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-304/+0
| | | | | | | | | | | | | | | | There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ClangTools: Fix clang-tidy command-line constructionChristian Kandeler2021-07-191-2/+2
| | | | | | Fixes: QTCREATORBUG-26015 Change-Id: I2850e6efa5b75748599f55e8b9c96757582f5cb4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ClangTools: Fix applying check optionsChristian Kandeler2021-06-291-4/+19
| | | | | | | | | | The algorithm we used to determine whether an option was applicable did not take the wildcard syntax into account that is used when all sub- checks of a group are enabled. Fixes: QTCREATORBUG-25827 Change-Id: I1d385bcc90ea9bf0bfac5cffe8739a8148aa740f Reviewed-by: David Schulz <david.schulz@qt.io>
* ClangTools: Support clang-tidy check optionsChristian Kandeler2021-01-061-0/+63
| | | | | | Fixes: QTCREATORBUG-24977 Change-Id: I33ea247ba98788245ae1264262f60d084b73778c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-3/+3
| | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppTools: Add missing serializationChristian Kandeler2020-05-291-0/+3
| | | | | | | | ... for ClangDiagnosticConfig::useBuildSystemWarnings(). Fixes: QTCREATORBUG-24084 Change-Id: Id06cc44f1aa690ea0ae5a808a3b8c95f83c62950 Reviewed-by: Nikolai Kosjar <pinaceae.pinus@gmail.com>
* CppTools: Add convenience functions to ClangDiagnosticConfigNikolai Kosjar2019-12-031-0/+10
| | | | | Change-Id: Iebf01e1ab71dc3500cc6e492c525735f300272ca Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Clang: Clean up TidyMode/ClazyMode enumeratorsNikolai Kosjar2019-12-031-1/+1
| | | | | Change-Id: Ie3ff0d629fd3c115df9c527e9ae8d7962fcfa156 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* ClangTools: Remove pointless "Disable" setting for clang-tidyNikolai Kosjar2019-12-031-4/+8
| | | | | | | ...as unchecking the root item in the tree has the same effect. Change-Id: I960ea2c09a71dad3b0ba3dfb38a19055653354cd Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* ClangTools: Query the tools for supported checksNikolai Kosjar2019-12-031-11/+19
| | | | | | | | | | | | | | | | ...instead of hardcoding them for a particular version of clang-tidy/clazy. While at it, move also the tidy/clazy widgets to ClangTools as this simplifies feeding data to them. Reduce also the built-in configs to a single one using clang-tidy's and clazy's default checks as they look very reasonable and saves us some porting effort. Also, our previous built-in configs were just too numerous. Change-Id: Ib9297acb7810a940b86a23a8695530506a570394 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Clang/ClangTools: Separate custom diagnostic configsNikolai Kosjar2019-10-011-0/+74
| | | | | | | | | | | | | | | | | | Add a separate pool of custom diagnostic configs for the ClangTools plugin. That is, the diagnostic configs in Menu: Tools > C++ > Code Model are not shared anymore with the configs at Menu: Tools > Analyzer > ClangTools On plugin initialization of ClangTools, move tidy/clazy related configs to ClangTools. Change-Id: Id06087a58b53e466a3d7bbac669550c5fbe9899d Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Allow to forward warnings flags from build systemNikolai Kosjar2019-02-051-1/+12
| | | | | | Change-Id: I47ebb1ce4f3b5544408eb1d0f891ed5090394282 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Use the tree instead of the list for Clang-Tidy settingsIvan Donchevskii2018-05-251-28/+4
| | | | | | | | | | | | | | | | | List of checks does not give enough flexibility to select/unselect specific checks. The tree fixes that. Also remove Clang-Tidy checks line edit because it is now integrated into the tree mode as an alternative way of providing checks by pressing "Plain text edit" button. 'cpptools_clangtidychecks.h' is generated using python script 'generateClangTidyChecks.py' and clang-tidy from our LLVM/Clang 6.0 build. Change-Id: I2ed1738cb2cbbf8dac6aba563469f06f69b11593 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* ClangTools: Add tool that runs clang-tidy and clazyIvan Donchevskii2018-04-261-0/+13
| | | | | | | | ... over the whole project. Generate and read serialized files to get diagnostics. Change-Id: Iafc25fc70443107a040a995efc038aed35102bbf Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Add combobox with tidy configuration optionsIvan Donchevskii2018-03-191-5/+27
| | | | | | | | | The old way was not flexible enough. With these options it's possible to just use your config file or set tidy command line yourself. Change-Id: I1bace40986668dee5e1b30c9d03090a3fd22e253 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Make clazy/tidy options part of the diagnostic configNikolai Kosjar2018-01-291-5/+27
| | | | | | | | As a side effect, clazy/tidy options become available for project specific customization in the projects mode. Change-Id: Id72762dedd857915139c15f532d2f1c6d1f43edb Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Let CppCodeModelSettings announce invalidated diagnostic configsNikolai Kosjar2018-01-291-0/+5
| | | | | Change-Id: I1fe62d4cd4bc91bfd73e57ace6dc9a87d13b3537 Reviewed-by: David Schulz <david.schulz@qt.io>
* Clang: turn off delayed template parsingIvan Donchevskii2017-06-081-5/+5
| | | | | | | | | Fix templates highlight and completion on Windows Add UI to turn on/off delayed parsing (off by default) Task-number: QTCREATORBUG-17222 Change-Id: I0cd5e0bcfff2789cd938e4096829f777ff15957a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Introduce switching/adding of warning configurationsNikolai Kosjar2016-03-011-0/+78
A warning configuration is a list of command line (warning) options for libclang. Three non-editable built-in configurations are provided by default. The user can copy a configuration to customize it. This is still a global setting and it changes take effect after re-opening a document. Both issues will be addressed in follow-up changes. Change-Id: I86667d7dc39ad31b88666454220e6da563797740 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>