Uncrustify maxscale
See script directory for method. The script to run in the top level MaxScale directory is called maxscale-uncrustify.sh, which uses another script, list-src, from the same directory (so you need to set your PATH). The uncrustify version was 0.66.
This commit is contained in:
@ -20,238 +20,238 @@
|
||||
|
||||
using std::string;
|
||||
|
||||
const char* test1_json =
|
||||
"{"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/servers/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"server1\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"Read-Connection-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3000,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Master, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3000,"
|
||||
" \"master_id\": -1,"
|
||||
" \"replication_depth\": 0,"
|
||||
" \"slaves\": ["
|
||||
" 3001,"
|
||||
" 3002,"
|
||||
" 3003"
|
||||
" ],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server2\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3001,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3001,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server3\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3002,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3002,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server4\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3003,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3003,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" }"
|
||||
" ]"
|
||||
"}";
|
||||
const char* test1_json
|
||||
= "{"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/servers/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"server1\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"Read-Connection-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3000,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Master, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3000,"
|
||||
" \"master_id\": -1,"
|
||||
" \"replication_depth\": 0,"
|
||||
" \"slaves\": ["
|
||||
" 3001,"
|
||||
" 3002,"
|
||||
" 3003"
|
||||
" ],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server2\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3001,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3001,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server3\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3002,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3002,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server4\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3003,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3003,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" }"
|
||||
" ]"
|
||||
"}";
|
||||
|
||||
int test1()
|
||||
{
|
||||
@ -293,7 +293,7 @@ int test1()
|
||||
|
||||
int test2()
|
||||
{
|
||||
char *s;
|
||||
char* s;
|
||||
json_t* err;
|
||||
|
||||
err = mxs_json_error("%s", "This is an error!");
|
||||
|
||||
Reference in New Issue
Block a user