-
Notifications
You must be signed in to change notification settings - Fork 465
Feature/pre swiftlint cleanup #495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/pre swiftlint cleanup #495
Conversation
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
…wift -- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
Sources/web3swift/Promises/Promise+Web3+Eth+SendTransaction.swift
Outdated
Show resolved
Hide resolved
@mloit I've left one rather important comment about documentation comments and the rest is just more cleaning (mostly removing commented code that is sitting here from 2018-2019). |
I'll restore those comments, that was the result of my normalizer script. This was merely intended to be a pre-flight cleanup, with no contextual analysis. But I can take a 2nd pass to remove those old commented out parts you identified, thanks! |
-- some comments previously using the wrong style were promoted
Thanks! You did a lot here. Removing old commented out parts here (in this particular PR) isn't a requirement of course. |
-- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES ***
-- some comments previously using the wrong style were promoted
also rebased off of develop as it had been updated from when I started this PR till now
…oit/web3swift into feature/pre-swiftlint-cleanup * 'feature/pre-swiftlint-cleanup' of https://github.com/mloit/web3swift: (24 commits) removed unnecessary trailing comment removed missed commented import Removed empty file committed in 2018 and never used removed commented code blocks that are identical to the actual code removed leading and trailing spaces within parenthesis removed old commented code removed old commented code removed old commented code from 2019 removed old commented code from 2018 removed code that has sat commented out since 2018 Removed unnecessary commented code Restore Quick Help friendly style comments -- some comments previously using the wrong style were promoted Basic code cleanup of Web3/*.swift -- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES *** Basic code cleanup of Utils/ENS/*.swift -- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES *** Basic code cleanup of Utils/EIP/*.swift and Utils/Hooks/*.swift -- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES *** Basic code cleanup of SwiftRLP/*.swift and Transaction/*.swift -- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES *** Basic code cleanup of Tokens/*/*.swift -- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES *** Basic code cleanup of Promises/*.swift -- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES *** Basic code cleanup of KeystoreManager/*.swift -- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES *** Basic code cleanup of EthereumAddress/*.swift and HookedFunctions/*.swift -- remove trailing whitespace -- limit vertical whitespace -- remove unnecessary commented out imports -- remove duplicate imports -- remove trailing semicolons -- minor code style cleanup *** NO FUNCTIONAL CHANGES *** ...
… it removed. Will remove the file in it's own PR
commit 2f090dd Merge: 0016aee 6cb1440 Author: Yaroslav <[email protected]> Date: Wed Mar 23 19:47:00 2022 +0300 Merge pull request #502 from skywinder/master commit 6cb1440 Merge: d6c0a4c 0016aee Author: Yaroslav <[email protected]> Date: Wed Mar 23 19:39:51 2022 +0300 Merge pull request #501 from skywinder/develop commit 0016aee Merge: 239887d 11517aa Author: Yaroslav <[email protected]> Date: Wed Mar 23 19:13:41 2022 +0300 Merge pull request #498 from mloit/feature/bug-fix-rollup commit d6c0a4c Author: Yaroslav <[email protected]> Date: Wed Mar 23 19:00:43 2022 +0300 Update podspec version. commit b6abf2e Merge: ff538e8 239887d Author: Yaroslav <[email protected]> Date: Wed Mar 23 18:58:00 2022 +0300 Merge pull request #500 from skywinder/develop commit 239887d Author: Yaroslav <[email protected]> Date: Wed Mar 23 18:11:18 2022 +0300 Update github action settings Try to fix ci/cd run cancelling issue. commit c781699 Merge: e1b0306 52002db Author: Yaroslav <[email protected]> Date: Wed Mar 23 15:56:32 2022 +0300 Merge pull request #496 from mloit/feature/remove-unused-file commit 52002db Author: mloit <[email protected]> Date: Wed Mar 23 07:59:50 2022 -0400 updated the xcode project file to reflect the file status change. commit e1b0306 Merge: e6f526e 17d7321 Author: Yaroslav <[email protected]> Date: Wed Mar 23 13:52:45 2022 +0300 Merge pull request #481 from mloit/fix-random-init commit e6f526e Merge: f85ab50 1edf2f6 Author: Yaroslav <[email protected]> Date: Wed Mar 23 13:26:38 2022 +0300 Merge pull request #490 from mloit/remove-dead-code commit 17d7321 Merge: cd5746d f85ab50 Author: Yaroslav <[email protected]> Date: Wed Mar 23 13:22:31 2022 +0300 Merge branch 'develop' into fix-random-init commit f85ab50 Merge: 5edab19 9d84b4a Author: Yaroslav <[email protected]> Date: Wed Mar 23 11:45:05 2022 +0300 Merge pull request #467 from mloit/tolerate1559 commit 11517aa Author: mloit <[email protected]> Date: Tue Mar 22 23:38:04 2022 -0400 fix unsafe forced unwrap in transaction signers commit 4774e99 Author: mloit <[email protected]> Date: Tue Mar 22 23:28:49 2022 -0400 fix typo in function name changed 'Signle' to 'Single' corrected all calling occurences commit 7fd2043 Author: mloit <[email protected]> Date: Tue Mar 22 23:26:46 2022 -0400 bugfix: if let makes no sense if the input won't produce an optional As it was it would throw a decode error instead of returning nil this was exposed when I fixed the coding key for callOnBlock, which typically isn't present commit b6000e9 Author: mloit <[email protected]> Date: Mon Mar 21 13:32:57 2022 -0400 fix TransactionOptions decoding of callOnBlock using incorrect key of .nonce commit 30711bb Author: mloit <[email protected]> Date: Mon Mar 21 13:30:45 2022 -0400 PR #440 bugfix, replace the fallthrough's with the desired action, as falling through caused erroneous decoding. commit e9b53c0 Author: mloit <[email protected]> Date: Mon Mar 21 13:28:38 2022 -0400 Restore failing #440 PR commit 9046350 Author: mloit <[email protected]> Date: Tue Mar 22 14:41:39 2022 -0400 File is empty and unused since 2018, I'm pretty sure we don't need it commit 1edf2f6 Author: Mark Loit <[email protected]> Date: Sun Mar 20 12:02:04 2022 -0400 more nil coalescing to clean up the original code commit 529d9ec Author: mloit <[email protected]> Date: Sun Mar 20 11:44:25 2022 -0400 nil coalescing commit df358d4 Author: Mark Loit <[email protected]> Date: Sun Mar 20 00:24:25 2022 -0400 refactored to work with Decodable stream commit dc0d85b Author: Mark Loit <[email protected]> Date: Sun Mar 20 00:23:12 2022 -0400 restoreWeb3+BrowserFunctions before proper refactor to remove reliance on the old json initializers in Transaction and TransactionOptions commit 482589d Author: Mark Loit <[email protected]> Date: Sat Mar 19 20:42:41 2022 -0400 Changed the parsing in TransactionInBlock to properly use the Decodable protocol instead of switching over to JSON parsing Removed all the old (now completely dead) JSON based parsing code. No point in keeping the JSON code as it duplicates the Decodable code, and makes code maintenance more difficult commit 9d84b4a Author: Mark Loit <[email protected]> Date: Wed Mar 16 15:32:14 2022 -0400 refactor to remove force unwraps commit cd5746d Author: Mark Loit <[email protected]> Date: Sun Mar 13 20:40:30 2022 -0400 fix buffer overrun issue (#470) where initialization with random bytes ignored the passed length and used a fixed length of 32 bytes. This results in only the first 32 bytes of larger objects being initialized, and overruns beyond the end for smaller objects. commit 051f94f Author: Mark Loit <[email protected]> Date: Thu Feb 10 00:11:30 2022 -0500 Provide basic tolerance to EIP-1559 data Test for the envelope 'type' if 0 or not present we assume legacy and can continue, otherwise abort as it is 1559 [or future] and we don't know its encoding Added some basic garbage-in garbage out checks to prevent calculations from generating an overflow. This will mean what comes out is garbage, but at least it didn't crash.
commit 2f090dd Merge: 0016aee 6cb1440 Author: Yaroslav <[email protected]> Date: Wed Mar 23 19:47:00 2022 +0300 Merge pull request #502 from skywinder/master commit 6cb1440 Merge: d6c0a4c 0016aee Author: Yaroslav <[email protected]> Date: Wed Mar 23 19:39:51 2022 +0300 Merge pull request #501 from skywinder/develop commit 0016aee Merge: 239887d 11517aa Author: Yaroslav <[email protected]> Date: Wed Mar 23 19:13:41 2022 +0300 Merge pull request #498 from mloit/feature/bug-fix-rollup commit d6c0a4c Author: Yaroslav <[email protected]> Date: Wed Mar 23 19:00:43 2022 +0300 Update podspec version. commit b6abf2e Merge: ff538e8 239887d Author: Yaroslav <[email protected]> Date: Wed Mar 23 18:58:00 2022 +0300 Merge pull request #500 from skywinder/develop commit 239887d Author: Yaroslav <[email protected]> Date: Wed Mar 23 18:11:18 2022 +0300 Update github action settings Try to fix ci/cd run cancelling issue. commit c781699 Merge: e1b0306 52002db Author: Yaroslav <[email protected]> Date: Wed Mar 23 15:56:32 2022 +0300 Merge pull request #496 from mloit/feature/remove-unused-file commit 52002db Author: mloit <[email protected]> Date: Wed Mar 23 07:59:50 2022 -0400 updated the xcode project file to reflect the file status change. commit e1b0306 Merge: e6f526e 17d7321 Author: Yaroslav <[email protected]> Date: Wed Mar 23 13:52:45 2022 +0300 Merge pull request #481 from mloit/fix-random-init commit e6f526e Merge: f85ab50 1edf2f6 Author: Yaroslav <[email protected]> Date: Wed Mar 23 13:26:38 2022 +0300 Merge pull request #490 from mloit/remove-dead-code commit 17d7321 Merge: cd5746d f85ab50 Author: Yaroslav <[email protected]> Date: Wed Mar 23 13:22:31 2022 +0300 Merge branch 'develop' into fix-random-init commit f85ab50 Merge: 5edab19 9d84b4a Author: Yaroslav <[email protected]> Date: Wed Mar 23 11:45:05 2022 +0300 Merge pull request #467 from mloit/tolerate1559 commit 11517aa Author: mloit <[email protected]> Date: Tue Mar 22 23:38:04 2022 -0400 fix unsafe forced unwrap in transaction signers commit 4774e99 Author: mloit <[email protected]> Date: Tue Mar 22 23:28:49 2022 -0400 fix typo in function name changed 'Signle' to 'Single' corrected all calling occurences commit 7fd2043 Author: mloit <[email protected]> Date: Tue Mar 22 23:26:46 2022 -0400 bugfix: if let makes no sense if the input won't produce an optional As it was it would throw a decode error instead of returning nil this was exposed when I fixed the coding key for callOnBlock, which typically isn't present commit b6000e9 Author: mloit <[email protected]> Date: Mon Mar 21 13:32:57 2022 -0400 fix TransactionOptions decoding of callOnBlock using incorrect key of .nonce commit 30711bb Author: mloit <[email protected]> Date: Mon Mar 21 13:30:45 2022 -0400 PR #440 bugfix, replace the fallthrough's with the desired action, as falling through caused erroneous decoding. commit e9b53c0 Author: mloit <[email protected]> Date: Mon Mar 21 13:28:38 2022 -0400 Restore failing #440 PR commit 9046350 Author: mloit <[email protected]> Date: Tue Mar 22 14:41:39 2022 -0400 File is empty and unused since 2018, I'm pretty sure we don't need it commit 1edf2f6 Author: Mark Loit <[email protected]> Date: Sun Mar 20 12:02:04 2022 -0400 more nil coalescing to clean up the original code commit 529d9ec Author: mloit <[email protected]> Date: Sun Mar 20 11:44:25 2022 -0400 nil coalescing commit df358d4 Author: Mark Loit <[email protected]> Date: Sun Mar 20 00:24:25 2022 -0400 refactored to work with Decodable stream commit dc0d85b Author: Mark Loit <[email protected]> Date: Sun Mar 20 00:23:12 2022 -0400 restoreWeb3+BrowserFunctions before proper refactor to remove reliance on the old json initializers in Transaction and TransactionOptions commit 482589d Author: Mark Loit <[email protected]> Date: Sat Mar 19 20:42:41 2022 -0400 Changed the parsing in TransactionInBlock to properly use the Decodable protocol instead of switching over to JSON parsing Removed all the old (now completely dead) JSON based parsing code. No point in keeping the JSON code as it duplicates the Decodable code, and makes code maintenance more difficult commit 9d84b4a Author: Mark Loit <[email protected]> Date: Wed Mar 16 15:32:14 2022 -0400 refactor to remove force unwraps commit cd5746d Author: Mark Loit <[email protected]> Date: Sun Mar 13 20:40:30 2022 -0400 fix buffer overrun issue (#470) where initialization with random bytes ignored the passed length and used a fixed length of 32 bytes. This results in only the first 32 bytes of larger objects being initialized, and overruns beyond the end for smaller objects. commit 051f94f Author: Mark Loit <[email protected]> Date: Thu Feb 10 00:11:30 2022 -0500 Provide basic tolerance to EIP-1559 data Test for the envelope 'type' if 0 or not present we assume legacy and can continue, otherwise abort as it is 1559 [or future] and we don't know its encoding Added some basic garbage-in garbage out checks to prevent calculations from generating an overflow. This will mean what comes out is garbage, but at least it didn't crash.
--this commit is really to try and force a resync between my fork and the main. GitHub is acting weirdly
This PR is huge, and literally does absolutely nothing... it's mostly whitespace. This was a quick (not really) pass through the main part of the repo to normalize the files a bit in advance of a proper swiftLint config.
Most importantly, this PR makes no functional changes to the code, everything is purely cosmetic.
-- remove trailing whitespace
-- limit vertical whitespace
-- remove unnecessary commented out imports
-- remove duplicate imports
-- remove trailing semicolons
-- minor code style cleanup