update format.sh (#6240)

* update format.sh

add shellcheck to format.sh
add statement macros to .clang-format
add no clang format to format.sh
add changed file list to format.sh diff
rename --cf-version to --print-version in format.sh
lint files

* enable --shell on ci runs

* remove useless semicolons

removes the semicolons after empty function definitions
these semicolons are optional, they don't do anything
this will have functions be consistently formatted
if we want to keep the option to have these on the same line like they
were before we should use the option AllowShortFunctionsOnASingleLine: None

* fix script

* update echo line in lint_cpp.sh which doesn't lint cpp only at all
This commit is contained in:
ebbit1q 2025-11-07 15:00:39 +01:00 committed by GitHub
parent bbec4d2c7e
commit d206a70b8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 145 additions and 29 deletions

View file

@ -6,6 +6,7 @@ version_line="$(grep 'INSERT INTO cockatrice_schema_version' servatrice/servatri
version_line="${version_line#*VALUES(}"
declare -i schema_ver="${version_line%%)*}"
# shellcheck disable=2012
latest_migration="$(ls -1 servatrice/migrations/ | tail -n1)"
xtoysql="${latest_migration#servatrice_}"
xtoy="${xtoysql%.sql}"
@ -23,7 +24,7 @@ if ((schema_ver != new_ver)); then
fi
expected_sql="^UPDATE cockatrice_schema_version SET version=${new_ver} WHERE version=${old_ver};$"
if ! grep -q "$expected_sql" servatrice/migrations/$latest_migration; then
if ! grep -q "$expected_sql" "servatrice/migrations/$latest_migration"; then
echo "$latest_migration does not contain expected sql: $expected_sql"
exit 1
fi

View file

@ -146,7 +146,9 @@ public:
AbstractServerSocketInterface(Servatrice *_server,
Servatrice_DatabaseInterface *_databaseInterface,
QObject *parent = 0);
~AbstractServerSocketInterface(){};
~AbstractServerSocketInterface()
{
}
bool initSession();
virtual QHostAddress getPeerAddress() const = 0;

View file

@ -10,7 +10,9 @@ class SignalHandler : public QObject
Q_OBJECT
public:
SignalHandler(QObject *parent = 0);
~SignalHandler(){};
~SignalHandler()
{
}
static void sigHupHandler(int /* sig */);
static void sigSegvHandler(int sig);