From e72ceb7fb6f04ead07cd3ec99236c5e519b772f4 Mon Sep 17 00:00:00 2001 From: James Adams Date: Thu, 28 Nov 2024 14:22:33 +0000 Subject: [PATCH 1/2] ncm-postgresql: Fix wrapping and indentation in pan --- .../src/main/pan/components/postgresql/schema.pan | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ncm-postgresql/src/main/pan/components/postgresql/schema.pan b/ncm-postgresql/src/main/pan/components/postgresql/schema.pan index b7d0f1f547..321171a097 100644 --- a/ncm-postgresql/src/main/pan/components/postgresql/schema.pan +++ b/ncm-postgresql/src/main/pan/components/postgresql/schema.pan @@ -4,8 +4,7 @@ include 'quattor/types/component'; function postgresql_is_hba_db = { # Check cardinality and type of argument. - if (ARGC != 1 || !is_string(ARGV[0])) - error(format("usage: %s(string)", FUNCTION)); + if (ARGC != 1 || !is_string(ARGV[0])) error(format("usage: %s(string)", FUNCTION)); if (match(ARGV[0], "^(all|sameuser|samerole|replication)$")) { true; @@ -16,8 +15,7 @@ function postgresql_is_hba_db = { function postgresql_is_hba_address = { # Check cardinality and type of argument. - if (ARGC != 1 || !is_string(ARGV[0])) - error(format("usage: %s(string)", FUNCTION)); + if (ARGC != 1 || !is_string(ARGV[0])) error(format("usage: %s(string)", FUNCTION)); if (match(ARGV[0], "^(samehost|samenet)$")) { true; From bae6f95b392fa5687204894ed9931aa14dc30a6a Mon Sep 17 00:00:00 2001 From: James Adams Date: Mon, 2 Dec 2024 09:55:59 +0000 Subject: [PATCH 2/2] ncm-postgresql: Remove redundant uses of format in error calls (Fix lint warnings) --- .../src/main/pan/components/postgresql/schema.pan | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ncm-postgresql/src/main/pan/components/postgresql/schema.pan b/ncm-postgresql/src/main/pan/components/postgresql/schema.pan index 321171a097..aae23cfba1 100644 --- a/ncm-postgresql/src/main/pan/components/postgresql/schema.pan +++ b/ncm-postgresql/src/main/pan/components/postgresql/schema.pan @@ -4,7 +4,7 @@ include 'quattor/types/component'; function postgresql_is_hba_db = { # Check cardinality and type of argument. - if (ARGC != 1 || !is_string(ARGV[0])) error(format("usage: %s(string)", FUNCTION)); + if (ARGC != 1 || !is_string(ARGV[0])) error("usage: %s(string)", FUNCTION); if (match(ARGV[0], "^(all|sameuser|samerole|replication)$")) { true; @@ -15,7 +15,7 @@ function postgresql_is_hba_db = { function postgresql_is_hba_address = { # Check cardinality and type of argument. - if (ARGC != 1 || !is_string(ARGV[0])) error(format("usage: %s(string)", FUNCTION)); + if (ARGC != 1 || !is_string(ARGV[0])) error("usage: %s(string)", FUNCTION); if (match(ARGV[0], "^(samehost|samenet)$")) { true; @@ -360,7 +360,7 @@ type postgresql_component = { }; if (exists(SELF["config"]) && (pg_port != port)) { - error(format("Legacy pg_port %s and config/main/port %s must be the same", pg_port, port)); + error("Legacy pg_port %s and config/main/port %s must be the same", pg_port, port); }; true;