File indexing completed on 2024-05-12 04:44:28
0001 #!/bin/bash 0002 0003 # SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com> 0004 # SPDX-License-Identifier: BSD-2-Clause OR MIT 0005 0006 0007 0008 0009 0010 ################# Documentation ################# 0011 # This script provides some environment variables. It can be called in other 0012 # scripts like this: 0013 # . scripts/run-export-environment.sh 0014 # The “.” command will execute it within the context of the calling script, 0015 # which is necessary in order to preserve the environment variables. 0016 0017 0018 0019 0020 0021 ################# CI: Continuous integration ################# 0022 # Define the number of parallel processes to be used (maximum 0023 # CPU threads available on the current system). 0024 PARALLEL_PROCESSES=`nproc --all` 0025 0026 # Define which checks we want to run. We run at level 2 (highest possible 0027 # number of warnings). Specific checks can be disabled. Example: 0028 # no-qproperty-without-notify will disable the qproperty-without-notify 0029 # check. Currently disabled are: 0030 # • no-inefficient-qlist-soft: In Qt6, QList and QVector will be aliases 0031 # anyway. And, in Qt6 QList will be the default type. So we will follow 0032 # this recommendation and always use QList. 0033 # 0034 # There are some more checks that are not part of any level and have to be 0035 # enabled manually. We enable all of them (that are available at the time 0036 # when writing this script), with the following exceptions: 0037 # • inefficient-qlist: In Qt6, QList and QVector will be aliases 0038 # anyway. And, in Qt6 QList will be the default type. So we will follow 0039 # this recommendation and always use QList. Anyway, in newer clazy 0040 # versions it is not available anymore anyway. 0041 # • jni-signatures: When enabling this check, the whole build won’t work 0042 # anymore (at least as long as you won’t build for Android). 0043 # • ifndef-define-typo: Shows many false-positives for Qt headers that we are 0044 # including. 0045 # • qt6-header-fixes: Generates warnings also for Qt5 headers we are 0046 # currently still using. 0047 # • qt6-fwd-fixes: Produces warnings that are not too useful while still 0048 # using Qt5. And also, we are using IWYU, which is quite pedantic about 0049 # which header to include and which one not, and IWYU gives probably the 0050 # more exact information. 0051 export CLAZY_CHECKS="level2,\ 0052 \ 0053 no-ctor-missing-parent-argument,\ 0054 \ 0055 assert-with-side-effects,\ 0056 container-inside-loop,\ 0057 detaching-member,\ 0058 heap-allocated-small-trivial-type,\ 0059 isempty-vs-count,\ 0060 qhash-with-char-pointer-key,\ 0061 qproperty-type-mismatch,\ 0062 qrequiredresult-candidates,\ 0063 qstring-varargs,\ 0064 qt4-qstring-from-array,\ 0065 qt6-deprecated-api-fixes,\ 0066 qt6-qhash-signature,\ 0067 qt6-qlatin1stringchar-to-u,\ 0068 qt-keywords,\ 0069 qvariant-template-instantiation,\ 0070 raw-environment-function,\ 0071 reserve-candidates,\ 0072 signal-with-return-value,\ 0073 thread-with-slots,\ 0074 tr-non-literal,\ 0075 unneeded-cast,\ 0076 use-chrono-in-qtimer" 0077 0078 # All paths that match this regular expression will be ignored. This is 0079 # necessary to prevent Clazy from generating errors for Qt headers. 0080 export CLAZY_IGNORE_DIRS="(.*/qt5/QtGui/.*)|(.*/qt5/QtCore/.*)|(.*/qt5/QtWidgets/.*)"