diff --git a/client/src/docker/lib/internal/dev-tools/lib_linter.bash b/client/src/docker/lib/internal/dev-tools/lib_linter.bash index 3cfc3c1..74416f3 100644 --- a/client/src/docker/lib/internal/dev-tools/lib_linter.bash +++ b/client/src/docker/lib/internal/dev-tools/lib_linter.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -170,7 +170,12 @@ function lib_linter::__lint_cpp() local -r _path=("$@") local -r _exts=("hh" "cc" "cpp" "C") - local -r _clang_format="clang-format -i" + local _clang_file + _clang_file="$(find ${DOCKER_FINANCE_CLIENT_REPO} -name .clang-format)" + [ -z "$_clang_file" ] && lib_utils::die_fatal ".clang-format not found" + declare -r _clang_file + + local -r _clang_format="clang-format -i --style=file:${_clang_file}" local -r _cpplint="cpplint --root=${DOCKER_FINANCE_CLIENT_REPO} --filter=-whitespace/braces,-whitespace/newline,-whitespace/line_length,-build/c++11 --headers=hh --extensions=hh,cc,cpp,C" local -r _cppcheck="cppcheck --enable=warning,style,performance,portability --inline-suppr --std=c++17"