aboutsummaryrefslogtreecommitdiffstats
path: root/.clang-tidy
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: Fix 'cppcoreguidelines-pro-type-member-init' warningsIvan Komissarov2020-04-271-1/+1
| | | | | | | | | | | Also, fix undefined behavior when setting and reading different field of a union (Lexer, Token) - according to the C++ Standard, it is not allowed to use a union to zero members of a struct. Treat these warnings as errors now. Change-Id: I0f6d071217ef55e2c75c51138fcff47048eca62f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'readability-*' warningsIvan Komissarov2020-04-201-1/+2
| | | | | | | Treat those as errors except for the 'readability-container-size-empty' Change-Id: I6a8bb9d68fb5bc89697cc42179337d338a51035e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Suppress 'cppcoreguidelines-pro-type-cstyle-cast' warningIvan Komissarov2020-04-171-0/+1
| | | | | | | Also, treat it as an error Change-Id: Ia2918ce83f2b27d8a039d2651c7edc2d40ccdbdc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'bugprone-narrowing-conversions' warningsIvan Komissarov2020-04-141-2/+0
| | | | | | | Also, treat those as errors Change-Id: I0771aa656273fd0a01c7787870d9de9b4c631823 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'modernize-use-bool-literals' warningsIvan Komissarov2020-04-141-6/+1
| | | | | | | | Also, treat those as errors Change-Id: I90ff7778e6e6333f4ca22706c8114c3608d39a39 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'readability-redundant-control-flow' warningsIvan Komissarov2020-04-141-1/+2
| | | | | | | Also, treat those as errors Change-Id: I7f27e6d19d7208dcb1ab083091e01f41017fb8bf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Disable more warningsIvan Komissarov2020-04-091-1/+1
| | | | | | | | This patch disables 'readability-redundant-member-init' and 'misc-unconventional-assign-operator' warnings Change-Id: I2a05ee7bd34f6476190a0e469890a19154ce53b2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Split checks on multiple linesIvan Komissarov2020-04-091-2/+70
| | | | | Change-Id: Iecef04f05fcf9d98605dabf787996985f68a9757 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'modernize-return-braced-init-list' warningsIvan Komissarov2020-04-081-1/+1
| | | | | | | Also, treat those as errors Change-Id: I566d3ea18965bb18df53a01914023ec73fccc620 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'google-readability-casting' warningsIvan Komissarov2020-04-071-1/+1
| | | | | | | Also, treat those as errors. Change-Id: I206844540eae6eef1e921f19453402a0c2874552 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'bugprone-suspicious-enum-usage' warningsIvan Komissarov2020-04-071-1/+1
| | | | | | | Also, treat those as errors Change-Id: I239b0a0597f56b87bcfdc139545b98c119232fdf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'google-readability-namespace-comments' warningsIvan Komissarov2020-04-071-1/+1
| | | | | | | Also, treat those as errors Change-Id: I33e5adef456b2c3445e00297d48770d99781aedd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: disable some warningsIvan Komissarov2020-04-071-1/+1
| | | | | | | | | | This patchset disables 'cppcoreguidelines-c-copy-assignment-signature', 'cppcoreguidelines-pro-bounds-constant-array-index', 'google-readability-function-size' and 'readability-function-size' warnings. Change-Id: I0c0df917d897433a1511a66c57dedf10710568fc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'misc-unused-using-decls' warningsIvan Komissarov2020-04-061-1/+1
| | | | | | | Also, treat those as errors now. Change-Id: I4f883c7c806d778487e37f07481d397466d5f817 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply 'modernize-pass-by-value' fix-itIvan Komissarov2020-01-281-2/+2
| | | | | | | | | Also, treat this warning as error This amends 936eee744db9b2fd1b9b66d168d80a113002aad2 Change-Id: I372c3b11baa08375d581052282f4546b2ba2e057 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Disable misc-throw-by-value-catch-by-referenceRichard Weickelt2020-01-081-1/+1
| | | | | | | | | We are throwing lvalues for readibility reasons and will not refactor the code anyway. Change-Id: I5e3bb619d689dd66f4631ee423f7d7de410f6d21 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix 'performance-unnecessary-copy-initialization' warningsIvan Komissarov2020-01-071-1/+1
| | | | | | | Also, treat all performance-* warnings as errors Change-Id: I571e6c2cc6f0d269309b0e9999cff45c9db5c723 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix 'performance-unnecessary-value-param' warningsIvan Komissarov2020-01-071-1/+1
| | | | | | | | | | Use more pass-by-const-ref since there is no point in passing objects by value in these cases Also, treat this warning as error Change-Id: I5382dcd56639f535cf240205cc5c3ac667c4ece3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix 'modernize-make-shared' clang-tidy warningIvan Komissarov2020-01-061-1/+1
| | | | | | | | Also, treat it as error now Change-Id: I4d8499ffa47ec43c2c3bf46deb073f28942d3853 Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Disable some clang-tidy checksIvan Komissarov2019-12-121-1/+1
| | | | | | | | | To reduce overall noise. Some checks can be enabled later after they are fixed Change-Id: Ic9d144bb5e896569acb3ee0de1d852dd53e2c10a Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix 'performance-move-const-arg' warningsIvan Komissarov2019-12-091-1/+1
| | | | | | | | | | | Also, treat that warning as error In some places move is redundant (e.g. when moving int or enum), in others it wasn't working as expected (i.e. not moving, but copying instead), in some, const-ref was (uselessly) moved. Fix those places Change-Id: I0b38667a71967fa35ca627990d3c12124fb62af0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Enable clang-tidy job on TravisIvan Komissarov2019-12-051-2/+2
| | | | | | | | | | | | | | | This runs predefined clang-tidy checks on the QBS sources, excluding examples and tests Most checks are displayed as warings, however, some checks are treated as errors to avoid adding regressions in the new code clang-analyzer-* checks are not enabled due to performance reasons (otherwise, Travis job hits 50 min) Change-Id: I686003d2526a11d90fc74c88104b4357d67620d1 Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add run-analyzer.sh scriptIvan Komissarov2019-06-041-0/+208
This script builds qbs, generates compile_commands.json and runs clang- tidy on the whole QBS project. Typical usage: $ cd qbs $ export LLVM_INSTALL_DIR=~/LLVM/ $ ./scripts/run-analyzer.sh Change-Id: Iff8d9483849589952a427f3b675298e4fcf11979 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>