summaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/clangtidy.py
Commit message (Collapse)AuthorAgeFilesLines
* Share common code between clang tidy and formatXavier Claessens2021-11-141-38/+15
|
* fix various flake8 whitespace errorsEli Schwartz2021-10-271-1/+1
|
* various python neatness cleanupsEli Schwartz2021-10-041-1/+1
| | | | | | | | | | | | | | | | All changes were created by running "pyupgrade --py3-only" and committing the results. Although this has been performed in the past, newer versions of pyupgrade can automatically catch more opportunities, notably list comprehensions can use generators instead, in the following cases: - unpacking into function arguments as function(*generator) - unpacking into assignments of the form x, y = generator - as the argument to some builtin functions such as min/max/sorted Also catch a few creeping cases of new code added using older styles.
* Fix clang-tidy return value reporting (Part â…¡)Florian Schmaus2020-11-171-1/+1
| | | | | | | | | It turns out my first attempt to fix this in 00d5ef3191e5 ("Fix clang-tidy return value reporting (#7949)") is not sufficient: The local variable returncode is never updated and stays at 0. This fixes the returncode calculation. Fixes: cce172432be3 ("Use run-clang-tidy when available.")
* Fix clang-tidy return value reporting (#7949)Florian Schmaus2020-11-071-5/+4
| | | | | | | | | | | | | | | | | | | | | | * Fix clang-tidy return value reporting In case clang-tidy is invoked manually, i.e. if run-clang-tidy(.py) is not found, Meson would not report the return value. This is caused by ignoring the return value of manual_clangformat() in clangformat() within mesonbuild/scripts/clangtidy.py. Even though only more recent-versions of clang-tidy actually report an non-zero exit code if errors are found, there is no reason Meson shouldn't simply report any error codes it received from clang-tidy. Fixes #7948. * Rename methods in clangtidy.py from clangformat to clangtidy For some unknown reason, the method names in clangtidy.py are clangformat() and manual_clangformat(). This is confusing, as clang-format is not invoked by them, clang-tidy is. Hence rename those from {manual_}clangformat() → {manual_}clangtidy()
* exclude generated file from clang-tidy processingMichele Dionisio2020-10-121-1/+3
| | | | | | by default run_clang_tidy process al file in compile_commands.json but the file generated has to be esclude like already done from manual_clangformat
* Never run clang-format / clang-tidy against directoriesBernd Busse2020-10-051-0/+2
| | | | | | | `pathlib.Path.glob()` also returns directories that match source filenames (i.e. a directory named `test.h/`), but `clang-format` and `clang-tidy` fail when handed a directory. We manually skip calling `clang-format` and `clang-tidy` on those directories.
* typing: fully annotate scriptsDaniel Mensinger2020-09-081-3/+5
|
* Use run-clang-tidy when available.Jussi Pakkanen2019-10-211-4/+18
|
* Add clang-tidy target. Closes #2383.Jussi Pakkanen2019-10-011-0/+38