---
# clang-tidy commit steps:
#
#   Configure clang-tidy and run checks (ignoring 3rd-party sources):
#   $ cmake -D CMAKE_EXPORT_COMPILE_COMMANDS=ON [...] ../ImageLounge
#   $ run-clang-tidy-18 -p ./ -header-filter=.* -fix ImageLounge/*
#
#   Check that it made no changes, if it did that must be resolved first.
#
#   Process ONE check, ignoring .clang-tidy, on all sources and auto-apply fixes:
#   $ run-clang-tidy-18 -p ./ -header-filter=.* -config={} -checks=modernize-use-nullptr -fix ImageLounge/*
#
#   Reformat sources, from the top directory (nomacs.git/):
#   $ ./scripts/format-cpp.sh --verbose -i
#
#   Review and test changes, make any necessary manual cleanups
#
#   Add the check and options to .clang-tidy
#
#   Run check using .clang-tidy config and see it did not change anything:
#   $ run-clang-tidy-18 -p ./ -header-filter=.* -fix ImageLounge/*
#
#   Add ONE commit for this check, including the modified .clang-tidy
#
HeaderFilterRegex:        '.*'
FormatStyle:              none
SystemHeaders:            false

#
# checks to consider adding
#
# modernize-loop-convert
# modernize-use-auto
# readability-identifier-naming
#

#
# checks enabled in CI
# checks partially completed are disabled for CI, with "-"
#
Checks: "\
bugprone-chained-comparison,\
bugprone-empty-catch,\
bugprone-forward-declaration-namespace,\
cert-*,\
-cert-err33-c,\
concurrency-mt-unsafe,\
cppcoreguidelines-avoid-goto,\
cppcoreguidelines-avoid-non-const-global-variables,\
-cppcoreguidelines-init-variables,\
cppcoreguidelines-interfaces-global-init,\
cppcoreguidelines-misleading-capture-default-by-value,\
cppcoreguidelines-missing-std-forward,\
cppcoreguidelines-rvalue-reference-param-not-moved,\
cppcoreguidelines-slicing,\
cppcoreguidelines-virtual-class-destructor,\
fuchsia-statically-constructed-objects,\
fuchsia-trailing-return,\
fuchsia-virtual-inheritance,\
-google-explicit-constructor,\
misc-definitions-in-headers,\
modernize-deprecated-headers,\
modernize-make-shared,\
modernize-make-unique,\
modernize-use-auto,\
modernize-use-bool-literals,\
modernize-use-emplace,\
modernize-use-equals-default,\
modernize-use-equals-delete,\
modernize-use-nullptr,\
modernize-use-override,\
"

# CheckOptions:
#   - key: readability-identifier-naming.VariableCase
#     value: camelBack
#   - key: readability-identifier-naming.MemberPrefix
#     value: m
#   - key: readability-identifier-naming.GlobalVariablePattern
#     value: '^g[A-Z][a-zA-z0-9]*$'

...
