#!/bin/bash

# SPDX-FileCopyrightText: 2008-2025 by Gilles Caulier, <caulier dot gilles at gmail dot com>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Clazy static analyzer configuration used by project/reports/clazy.sh

# --- Directories to exclude from Clazy static analysis.

IGNORE_DIRS=".*include.*|"
IGNORE_DIRS+=".*/opt/qt6/include/.*|"
IGNORE_DIRS+=".*/usr/include/.*|"
IGNORE_DIRS+=".*gmicqt/src/.*|"
IGNORE_DIRS+=".*gmicqt/gmic/src/.*|"
# Remove last character
IGNORE_DIRS=${IGNORE_DIRS::-1}

export CLAZY_IGNORE_DIRS=$IGNORE_DIRS

# --- Checkers to include on Clazy static analysis.

export CLAZY_CHECKS="\
level2,\
no-qproperty-without-notify,\
no-old-style-connect,\
no-qstring-allocations,\
no-qstring-arg,\
no-qstring-ref,\
no-qstring-insensitive-allocation,\
no-function-args-by-value,\
no-fully-qualified-moc-types,\
no-unexpected-flag-enumerator-value,\
qt6-qhash-signature,\
qt6-deprecated-api-fixes,\
qt6-fwd-fixes,\
qt6-header-fixes,\
no-module-include,\
signal-with-return-value,\
raw-environment-function,\
qt-keywords,\
missing-qobject-macro,\
range-loop-detach,\
range-loop-reference,\
use-static-qregularexpression\
"
