From bcf3b68d2170f3d16baca425e2c2c1f338d67470 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 11 Nov 2024 18:41:17 -0500 Subject: [PATCH 1/5] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..b026c85 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From 5197f02d00a54de558541258bee8f413cfc6c833 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 11 Nov 2024 18:41:17 -0500 Subject: [PATCH 2/5] Add rudimentary codespell config --- .codespellrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..1cd4cac --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git*,.codespellrc +check-hidden = true +# ignore-regex = +# ignore-words-list = From 77f2299f345e1b692af7342e2704b39260a7222e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 11 Nov 2024 18:42:24 -0500 Subject: [PATCH 3/5] Tune up codespell --- .codespellrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codespellrc b/.codespellrc index 1cd4cac..b62a756 100644 --- a/.codespellrc +++ b/.codespellrc @@ -2,5 +2,5 @@ # Ref: https://github.com/codespell-project/codespell#using-a-config-file skip = .git*,.codespellrc check-hidden = true -# ignore-regex = +ignore-regex = \b(TE|catchE|Ser|BU|bu)\b # ignore-words-list = From 4ffb1c99bf30247d3da83266b71500ad539ab108 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 11 Nov 2024 18:43:11 -0500 Subject: [PATCH 4/5] [DATALAD RUNCMD] run codespell throughout fixing typos automagically (but ignoring overall fail due to ambigous ones) === Do not change lines below === { "chain": [], "cmd": "codespell -w || :", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- Aws/Core.hs | 2 +- Aws/DynamoDb/Commands/UpdateItem.hs | 2 +- Aws/Iam/Commands/GetGroup.hs | 2 +- Aws/Iam/Commands/GetGroupPolicy.hs | 2 +- Aws/Iam/Commands/GetUser.hs | 2 +- Aws/Iam/Commands/GetUserPolicy.hs | 2 +- Aws/Sqs/Commands/Message.hs | 8 ++++---- Examples/Sqs.hs | 2 +- tests/S3/Main.hs | 2 +- tests/Sqs/Main.hs | 4 ++-- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Aws/Core.hs b/Aws/Core.hs index 623c75b..01c4dfd 100644 --- a/Aws/Core.hs +++ b/Aws/Core.hs @@ -497,7 +497,7 @@ queryToHttpRequest SignedQuery{..} = do ++ sqOtherHeaders , HTTP.requestBody = - -- An explicityly defined body parameter should overwrite everything else. + -- An explicitly defined body parameter should overwrite everything else. case sqBody of Just x -> x Nothing -> diff --git a/Aws/DynamoDb/Commands/UpdateItem.hs b/Aws/DynamoDb/Commands/UpdateItem.hs index 1152b5a..cb7551c 100644 --- a/Aws/DynamoDb/Commands/UpdateItem.hs +++ b/Aws/DynamoDb/Commands/UpdateItem.hs @@ -105,7 +105,7 @@ instance ToJSON AttributeUpdates where -- -- @http:\/\/docs.aws.amazon.com\/amazondynamodb\/latest\/APIReference\/API_UpdateItem.html@ data UpdateAction - = UPut -- ^ Simpley write, overwriting any previous value + = UPut -- ^ Simply write, overwriting any previous value | UAdd -- ^ Numerical add or add to set. | UDelete -- ^ Empty value: remove; Set value: Subtract from set. deriving (Eq,Show,Read,Ord) diff --git a/Aws/Iam/Commands/GetGroup.hs b/Aws/Iam/Commands/GetGroup.hs index aa8f5c3..2323240 100644 --- a/Aws/Iam/Commands/GetGroup.hs +++ b/Aws/Iam/Commands/GetGroup.hs @@ -15,7 +15,7 @@ import Data.Text (Text) import Data.Typeable import Prelude --- | Retreives information about the given user. +-- | Retrieves information about the given user. -- -- If a user name is not given, IAM determines the user name based on the -- access key signing the request. diff --git a/Aws/Iam/Commands/GetGroupPolicy.hs b/Aws/Iam/Commands/GetGroupPolicy.hs index 212c63d..6647cef 100644 --- a/Aws/Iam/Commands/GetGroupPolicy.hs +++ b/Aws/Iam/Commands/GetGroupPolicy.hs @@ -18,7 +18,7 @@ import qualified Network.HTTP.Types as HTTP import Text.XML.Cursor (($//)) import Prelude --- | Retreives the specified policy document for the specified group. +-- | Retrieves the specified policy document for the specified group. -- -- data GetGroupPolicy diff --git a/Aws/Iam/Commands/GetUser.hs b/Aws/Iam/Commands/GetUser.hs index aa8f5c3..2323240 100644 --- a/Aws/Iam/Commands/GetUser.hs +++ b/Aws/Iam/Commands/GetUser.hs @@ -15,7 +15,7 @@ import Data.Text (Text) import Data.Typeable import Prelude --- | Retreives information about the given user. +-- | Retrieves information about the given user. -- -- If a user name is not given, IAM determines the user name based on the -- access key signing the request. diff --git a/Aws/Iam/Commands/GetUserPolicy.hs b/Aws/Iam/Commands/GetUserPolicy.hs index 4e60f5a..159af47 100644 --- a/Aws/Iam/Commands/GetUserPolicy.hs +++ b/Aws/Iam/Commands/GetUserPolicy.hs @@ -18,7 +18,7 @@ import qualified Network.HTTP.Types as HTTP import Text.XML.Cursor (($//)) import Prelude --- | Retreives the specified policy document for the specified user. +-- | Retrieves the specified policy document for the specified user. -- -- data GetUserPolicy diff --git a/Aws/Sqs/Commands/Message.hs b/Aws/Sqs/Commands/Message.hs index 62fbf3f..9857210 100644 --- a/Aws/Sqs/Commands/Message.hs +++ b/Aws/Sqs/Commands/Message.hs @@ -19,7 +19,7 @@ module Aws.Sqs.Commands.Message , ReceiveMessage(..) , ReceiveMessageResponse(..) --- * Change Message Visiblity +-- * Change Message Visibility , ChangeMessageVisibility(..) , ChangeMessageVisibilityResponse(..) ) where @@ -426,7 +426,7 @@ data ReceiveMessage = ReceiveMessage -- -- all elements except for the attributes are specified as required. -- At least for the field 'mMD5OfMessageAttributes' the the service --- is not always returning a value and therefor we make this field optional. +-- is not always returning a value and therefore we make this field optional. -- data Message = Message { mMessageId :: !T.Text @@ -508,7 +508,7 @@ readUserMessageAttributeValue cursor = do return $ UserMessageAttributeBinary c val (x, _) -> throwM . XmlException - $ "unkown data type for MessageAttributeValue: " <> T.unpack x + $ "unknown data type for MessageAttributeValue: " <> T.unpack x where parseType s = case T.break (== '.') s of (a, "") -> (a, Nothing) @@ -519,7 +519,7 @@ readMessage :: Cu.Cursor -> Response SqsMetadata Message readMessage cursor = do mid <- force "Missing Message Id" $ cursor $// Cu.laxElement "MessageId" &/ Cu.content - rh <- force "Missing Reciept Handle" + rh <- force "Missing Receipt Handle" $ cursor $// Cu.laxElement "ReceiptHandle" &/ Cu.content md5 <- force "Missing MD5 Signature" $ cursor $// Cu.laxElement "MD5OfBody" &/ Cu.content diff --git a/Examples/Sqs.hs b/Examples/Sqs.hs index 0bd82f9..5b974f3 100644 --- a/Examples/Sqs.hs +++ b/Examples/Sqs.hs @@ -90,7 +90,7 @@ main = do -} exceptT T.putStrLn T.putStrLn . retryT 4 $ do qUrls <- liftIO $ do - putStrLn $ "Listing all queueus to check to see if " ++ show (Sqs.qName sqsQName) ++ " is gone" + putStrLn $ "Listing all queues to check to see if " ++ show (Sqs.qName sqsQName) ++ " is gone" Sqs.ListQueuesResponse qUrls_ <- Aws.simpleAws cfg sqscfg $ Sqs.ListQueues Nothing mapM_ T.putStrLn qUrls_ return qUrls_ diff --git a/tests/S3/Main.hs b/tests/S3/Main.hs index 04fad98..1315b11 100644 --- a/tests/S3/Main.hs +++ b/tests/S3/Main.hs @@ -88,7 +88,7 @@ help = L.intercalate "\n" , "By running the tests in this test-suite costs for usage of AWS" , "services may incur." , "" - , "In order to actually excute the tests in this test-suite you must" + , "In order to actually execute the tests in this test-suite you must" , "provide the command line options:" , "" , " --run-with-aws-credentials" diff --git a/tests/Sqs/Main.hs b/tests/Sqs/Main.hs index 871c980..49fd082 100644 --- a/tests/Sqs/Main.hs +++ b/tests/Sqs/Main.hs @@ -83,7 +83,7 @@ help = L.intercalate "\n" , "By running the tests in this test-suite costs for usage of AWS" , "services may incur." , "" - , "In order to actually excute the tests in this test-suite you must" + , "In order to actually execute the tests in this test-suite you must" , "provide the command line options:" , "" , " --run-with-aws-credentials" @@ -297,7 +297,7 @@ prop_sendReceiveDeleteMessageLongPolling queue = do -- | Checks that long polling is actually enabled. We add a delay to the messages -- and immediately make a receive request with a polling wait time that is larger -- than the delay. Note that even though polling forces consistent reads, messages --- will become available with some (small) offset. Therefor we request only a single +-- will become available with some (small) offset. Therefore we request only a single -- message at a time. -- prop_sendReceiveDeleteMessageLongPolling1 From 4443f9f2fd4d42eb039475028507c42441aa5882 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 11 Nov 2024 18:44:05 -0500 Subject: [PATCH 5/5] [DATALAD RUNCMD] Do interactive fixing of some ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- Aws/Core.hs | 2 +- Aws/DynamoDb/Commands/DeleteItem.hs | 2 +- Aws/DynamoDb/Commands/PutItem.hs | 2 +- CHANGELOG.md | 2 +- tests/DynamoDb/Utils.hs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Aws/Core.hs b/Aws/Core.hs index 01c4dfd..0b4a38e 100644 --- a/Aws/Core.hs +++ b/Aws/Core.hs @@ -524,7 +524,7 @@ queryToHttpRequest SignedQuery{..} = do PostQuery -> Just "application/x-www-form-urlencoded; charset=utf-8" _ -> Nothing --- | Create a URI fro a 'SignedQuery' object. +-- | Create a URI from a 'SignedQuery' object. -- -- Unused / incompatible fields will be silently ignored. queryToUri :: SignedQuery -> B.ByteString diff --git a/Aws/DynamoDb/Commands/DeleteItem.hs b/Aws/DynamoDb/Commands/DeleteItem.hs index 9a4a26d..514a819 100644 --- a/Aws/DynamoDb/Commands/DeleteItem.hs +++ b/Aws/DynamoDb/Commands/DeleteItem.hs @@ -39,7 +39,7 @@ data DeleteItem = DeleteItem { , diKey :: PrimaryKey -- ^ The item to delete. , diExpect :: Conditions - -- ^ (Possible) set of expections for a conditional Put + -- ^ (Possible) set of exceptions for a conditional Put , diReturn :: UpdateReturn -- ^ What to return from this query. , diRetCons :: ReturnConsumption diff --git a/Aws/DynamoDb/Commands/PutItem.hs b/Aws/DynamoDb/Commands/PutItem.hs index 28478d7..d6a5722 100644 --- a/Aws/DynamoDb/Commands/PutItem.hs +++ b/Aws/DynamoDb/Commands/PutItem.hs @@ -40,7 +40,7 @@ data PutItem = PutItem { -- ^ An item to Put. Attributes here will replace what maybe under -- the key on DDB. , piExpect :: Conditions - -- ^ (Possible) set of expections for a conditional Put + -- ^ (Possible) set of exceptions for a conditional Put , piReturn :: UpdateReturn -- ^ What to return from this query. , piRetCons :: ReturnConsumption diff --git a/CHANGELOG.md b/CHANGELOG.md index 5153565..66230bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -293,7 +293,7 @@ NOTE: 0.13 brings breaking changes compared to 0.12.1! \#72, \#74) - SES: SendRawEmail now correctly encodes destinations and allows multiple destinations (\#73) - - EC2: support fo Instance metadata (\#37) + - EC2: support for Instance metadata (\#37) - Core: queryToHttpRequest allows overriding "Date" for the benefit of Chris Dornan's Elastic Transcoder bindings (\#77) diff --git a/tests/DynamoDb/Utils.hs b/tests/DynamoDb/Utils.hs index 0bd6bf7..a63fa89 100644 --- a/tests/DynamoDb/Utils.hs +++ b/tests/DynamoDb/Utils.hs @@ -118,7 +118,7 @@ withTable withTable = withTable_ True withTable_ - :: Bool -- ^ whether to prefix te table name + :: Bool -- ^ whether to prefix the table name -> T.Text -- ^ table Name -> Int -- ^ read capacity (#(non-consistent) reads * itemsize/4KB) -> Int -- ^ write capacity (#writes * itemsize/1KB)