From c4132d7d9c07a49fb2c9931b9b4d691f14fcd1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Tue, 2 Jul 2024 17:21:07 +0200 Subject: [PATCH 1/3] Fix hlint warning --- cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs index abc1cce19e..20798e1dea 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs @@ -537,7 +537,7 @@ pHexHash a mErrPrefix = . deserialiseFromRawBytesHex (AsHash a) . BSC.pack where - errPrefix = maybe "" ((<>) ": ") mErrPrefix + errPrefix = maybe "" (": " <>) mErrPrefix pBech32KeyHash :: SerialiseAsBech32 (Hash a) => AsType a -> ReadM (Hash a) pBech32KeyHash a = From 20cc4404d820109d76a93be6656b3b051eba9826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Thu, 4 Jul 2024 11:33:31 +0200 Subject: [PATCH 2/3] Fix typo in help/error messages --- .../src/Cardano/CLI/EraBased/Options/Common.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs index 20798e1dea..bcca45cf6d 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs @@ -660,7 +660,7 @@ pAddCommitteeColdVerificationKeyHash = where deserialiseFromHex :: String -> Either String (Hash CommitteeColdKey) deserialiseFromHex = - first (\e -> docToString $ "Invalid Consitutional Committee cold key hash: " <> prettyError e) + first (\e -> docToString $ "Invalid Constitutional Committee cold key hash: " <> prettyError e) . deserialiseFromRawBytesHex (AsHash AsCommitteeColdKey) . BSC.pack @@ -690,7 +690,7 @@ pAddCommitteeColdVerificationKeyFile = fmap File $ Opt.strOption $ mconcat [ Opt.long "add-cc-cold-verification-key-file" , Opt.metavar "FILE" - , Opt.help "Filepath of the Consitutional Committee cold key." + , Opt.help "Filepath of the Constitutional Committee cold key." , Opt.completer (Opt.bashCompleter "file") ] @@ -755,7 +755,7 @@ pRemoveCommitteeColdVerificationKeyFile = fmap File $ Opt.strOption $ mconcat [ Opt.long "remove-cc-cold-verification-key-file" , Opt.metavar "FILE" - , Opt.help "Filepath of the Consitutional Committee cold key." + , Opt.help "Filepath of the Constitutional Committee cold key." , Opt.completer (Opt.bashCompleter "file") ] @@ -796,7 +796,7 @@ pCommitteeColdVerificationKeyFile = fmap File $ Opt.strOption $ mconcat [ Opt.long "cold-verification-key-file" , Opt.metavar "FILE" - , Opt.help "Filepath of the Consitutional Committee cold key." + , Opt.help "Filepath of the Constitutional Committee cold key." , Opt.completer (Opt.bashCompleter "file") ] @@ -867,14 +867,14 @@ deserialiseHotCCKeyFromHex = deserialiseHotCCKeyHashFromHex :: ReadM (Hash CommitteeHotKey) deserialiseHotCCKeyHashFromHex = - pHexHash AsCommitteeHotKey (Just "Invalid Consitutional Committee hot key hash") + pHexHash AsCommitteeHotKey (Just "Invalid Constitutional Committee hot key hash") pCommitteeHotVerificationKeyFile :: String -> Parser (VerificationKeyFile In) pCommitteeHotVerificationKeyFile longFlag = fmap File $ Opt.strOption $ mconcat [ Opt.long longFlag , Opt.metavar "FILE" - , Opt.help "Filepath of the Consitutional Committee hot key." + , Opt.help "Filepath of the Constitutional Committee hot key." , Opt.completer (Opt.bashCompleter "file") ] From cf6ddd5e049bb6679477011d7f9ed6023bc9efe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Thu, 4 Jul 2024 11:35:31 +0200 Subject: [PATCH 3/3] Adapt golden files --- .../golden/help/conway_governance_action_update-committee.cli | 4 ++-- ...ance_committee_create-cold-key-resignation-certificate.cli | 2 +- ...nce_committee_create-hot-key-authorization-certificate.cli | 4 ++-- .../files/golden/help/conway_governance_vote_create.cli | 2 +- .../files/golden/help/conway_query_committee-state.cli | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_update-committee.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_update-committee.cli index 5754de8d53..9c5dc83f21 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_update-committee.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_update-committee.cli @@ -51,7 +51,7 @@ Available options: --remove-cc-cold-verification-key STRING Constitutional Committee cold key (hex-encoded). --remove-cc-cold-verification-key-file FILE - Filepath of the Consitutional Committee cold key. + Filepath of the Constitutional Committee cold key. --remove-cc-cold-verification-key-hash STRING Constitutional Committee key hash (hex-encoded). --remove-cc-cold-script-hash HASH @@ -60,7 +60,7 @@ Available options: --add-cc-cold-verification-key STRING Constitutional Committee cold key (hex-encoded). --add-cc-cold-verification-key-file FILE - Filepath of the Consitutional Committee cold key. + Filepath of the Constitutional Committee cold key. --add-cc-cold-verification-key-hash STRING Constitutional Committee key hash (hex-encoded). --add-cc-cold-script-hash HASH diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_committee_create-cold-key-resignation-certificate.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_committee_create-cold-key-resignation-certificate.cli index acdf94cfe4..546866a47d 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_committee_create-cold-key-resignation-certificate.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_committee_create-cold-key-resignation-certificate.cli @@ -15,7 +15,7 @@ Available options: --cold-verification-key STRING Constitutional Committee cold key (hex-encoded). --cold-verification-key-file FILE - Filepath of the Consitutional Committee cold key. + Filepath of the Constitutional Committee cold key. --cold-verification-key-hash STRING Constitutional Committee key hash (hex-encoded). --cold-script-hash HASH Committee cold Native or Plutus script file hash diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_committee_create-hot-key-authorization-certificate.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_committee_create-hot-key-authorization-certificate.cli index 94908152dd..e9f0cd8b37 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_committee_create-hot-key-authorization-certificate.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_committee_create-hot-key-authorization-certificate.cli @@ -19,7 +19,7 @@ Available options: --cold-verification-key STRING Constitutional Committee cold key (hex-encoded). --cold-verification-key-file FILE - Filepath of the Consitutional Committee cold key. + Filepath of the Constitutional Committee cold key. --cold-verification-key-hash STRING Constitutional Committee key hash (hex-encoded). --cold-script-hash HASH Committee cold Native or Plutus script file hash @@ -29,7 +29,7 @@ Available options: --hot-verification-key STRING Constitutional Committee hot key (hex-encoded). --hot-verification-key-file FILE - Filepath of the Consitutional Committee hot key. + Filepath of the Constitutional Committee hot key. --hot-verification-key-hash STRING Constitutional Committee key hash (hex-encoded). --hot-script-hash HASH Committee hot Native or Plutus script file hash diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_vote_create.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_vote_create.cli index 4cad3f372d..83fece99c6 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_vote_create.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_vote_create.cli @@ -42,7 +42,7 @@ Available options: --cc-hot-verification-key STRING Constitutional Committee hot key (hex-encoded). --cc-hot-verification-key-file FILE - Filepath of the Consitutional Committee hot key. + Filepath of the Constitutional Committee hot key. --cc-hot-key-hash STRING Constitutional Committee key hash (hex-encoded). --cc-hot-script-hash HASH Cold Native or Plutus script file hash (hex-encoded). diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_committee-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_committee-state.cli index e47138a4e5..7439c862e6 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_committee-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_committee-state.cli @@ -42,13 +42,13 @@ Available options: --cold-verification-key STRING Constitutional Committee cold key (hex-encoded). --cold-verification-key-file FILE - Filepath of the Consitutional Committee cold key. + Filepath of the Constitutional Committee cold key. --cold-verification-key-hash STRING Constitutional Committee key hash (hex-encoded). --cold-script-hash HASH Cold Native or Plutus script file hash (hex-encoded). Obtain it with "cardano-cli hash script ...". --hot-key STRING Constitutional Committee hot key (hex-encoded). - --hot-key-file FILE Filepath of the Consitutional Committee hot key. + --hot-key-file FILE Filepath of the Constitutional Committee hot key. --hot-key-hash STRING Constitutional Committee key hash (hex-encoded). --hot-script-hash HASH Hot Native or Plutus script file hash (hex-encoded). Obtain it with "cardano-cli hash script ...".