diff --git a/docs/src/tools/Code-Similarity-Detector.md b/docs/src/tools/Code-Similarity-Detector.md index 7446118cf0..2438a22d8d 100644 --- a/docs/src/tools/Code-Similarity-Detector.md +++ b/docs/src/tools/Code-Similarity-Detector.md @@ -98,7 +98,7 @@ INFO:Slither-simil:Saving cache in cache.npz INFO:Slither-simil:Done! ``` -After it runs, the `slither-simil` will output the the trained model in `model.bin`, a cache of every function for use in test mode in `cache.npz`, and the SlithIR of every function for debugging in `last_data_train.txt`. +After it runs, the `slither-simil` will output the trained model in `model.bin`, a cache of every function for use in test mode in `cache.npz`, and the SlithIR of every function for debugging in `last_data_train.txt`. ### Plot mode @@ -109,7 +109,7 @@ Here's an example to plot all the functions named `add` from contracts named `Sa ``` $ slither-simil plot etherscan_verified_contracts.bin --fname SafeMath.add --input cache.npz --nsamples 500 INFO:Slither-simil:Loading data.. -INFO:Slither-simil:Procesing data.. +INFO:Slither-simil:Processing data.. INFO:Slither-simil:Plotting data.. INFO:Slither-simil:Saving figure to plot.png.. ``` @@ -118,7 +118,7 @@ INFO:Slither-simil:Saving figure to plot.png.. This mode performs dimensionality reduction using PCA, so the axes you see here [are **not** associated with any particular unit](https://stats.stackexchange.com/questions/137813/the-meaning-of-units-on-the-axes-of-a-pca-plot). -It can can be also used to plot sets of functions using only a name from any contract (e.g. `burn`) . +It can also be used to plot sets of functions using only a name from any contract (e.g. `burn`) . ### Info mode diff --git a/slither/core/cfg/node.py b/slither/core/cfg/node.py index 231608f4c9..91b231fa12 100644 --- a/slither/core/cfg/node.py +++ b/slither/core/cfg/node.py @@ -885,7 +885,7 @@ def _find_read_write_call(self) -> None: # pylint: disable=too-many-statements if isinstance(ir, InternalCall): self._internal_calls.append(ir) if isinstance(ir, SolidityCall): - # TODO: consider removing dependancy of solidity_call to internal_call + # TODO: consider removing dependency of solidity_call to internal_call self._solidity_calls.append(ir) self._internal_calls.append(ir) if isinstance(ir, LowLevelCall): diff --git a/slither/core/declarations/contract.py b/slither/core/declarations/contract.py index 8dccc007f9..356f38a4e4 100644 --- a/slither/core/declarations/contract.py +++ b/slither/core/declarations/contract.py @@ -843,7 +843,7 @@ def get_functions_reading_from_variable(self, variable: "Variable") -> List["Fun def get_functions_writing_to_variable(self, variable: "Variable") -> List["Function"]: """ - Return the functions writting the variable + Return the functions writing the variable """ return [f for f in self.functions if f.is_writing(variable)] diff --git a/slither/detectors/compiler_bugs/uninitialized_function_ptr_in_constructor.py b/slither/detectors/compiler_bugs/uninitialized_function_ptr_in_constructor.py index 826b671bd1..14f1ac11a8 100644 --- a/slither/detectors/compiler_bugs/uninitialized_function_ptr_in_constructor.py +++ b/slither/detectors/compiler_bugs/uninitialized_function_ptr_in_constructor.py @@ -122,7 +122,7 @@ def _detect(self) -> List[Output]: node_info: DETECTOR_INFO = [ "\t ", node, - " is an unintialized function pointer call in a constructor\n", + " is an uninitialized function pointer call in a constructor\n", ] json = self.generate_result(contract_info + node_info) results.append(json) diff --git a/slither/detectors/statements/pyth_unchecked.py b/slither/detectors/statements/pyth_unchecked.py index fa3f91b2f5..19e774e00c 100644 --- a/slither/detectors/statements/pyth_unchecked.py +++ b/slither/detectors/statements/pyth_unchecked.py @@ -13,7 +13,7 @@ class PythUnchecked(AbstractDetector): Documentation: This detector finds deprecated Pyth function calls """ - # To be overriden in the derived class + # To be overridden in the derived class PYTH_FUNCTIONS = [] PYTH_FIELD = "" diff --git a/slither/solc_parsing/expressions/find_variable.py b/slither/solc_parsing/expressions/find_variable.py index 4ea1239e52..6bf90f6b4f 100644 --- a/slither/solc_parsing/expressions/find_variable.py +++ b/slither/solc_parsing/expressions/find_variable.py @@ -253,7 +253,7 @@ def _find_in_contract( # TODO refactor find_variable to prevent this from happening pass - # If the enum is refered as its name rather than its canonicalName + # If the enum is referred as its name rather than its canonicalName enums = {e.name: e for e in contract.enums} if var_name in enums: return enums[var_name] diff --git a/slither/tools/kspec_coverage/analysis.py b/slither/tools/kspec_coverage/analysis.py index a2ae236606..16d107492c 100755 --- a/slither/tools/kspec_coverage/analysis.py +++ b/slither/tools/kspec_coverage/analysis.py @@ -70,7 +70,7 @@ def _get_slither_functions( and not f.is_constructor_variables ) ] - # Use list(set()) because same state variable instances can be shared accross contracts + # Use list(set()) because same state variable instances can be shared across contracts # TODO: integrate state variables all_functions_declared += list( {s for s in slither.state_variables if s.visibility in ["public", "external"]} diff --git a/slither/tools/similarity/plot.py b/slither/tools/similarity/plot.py index f11e921293..6042a415f3 100644 --- a/slither/tools/similarity/plot.py +++ b/slither/tools/similarity/plot.py @@ -54,7 +54,7 @@ def plot(args: argparse.Namespace) -> None: # pylint: disable=too-many-locals data = [] fs = [] - logger.info("Procesing data..") + logger.info("Processing data..") for (f, c, n), y in cache.items(): if (c == contract or contract is None) and n == fname: fs.append(f) diff --git a/tests/e2e/solc_parsing/test_data/yul-solady.sol b/tests/e2e/solc_parsing/test_data/yul-solady.sol index b82dddcf45..aad1f85be5 100644 --- a/tests/e2e/solc_parsing/test_data/yul-solady.sol +++ b/tests/e2e/solc_parsing/test_data/yul-solady.sol @@ -33,7 +33,7 @@ contract C { // Snippet of the Initializable contract that was making slither crashes // https://github.com/Vectorized/solady/blob/9298d096feb87de9a8873a704ff98f6892064c65/src/utils/Initializable.sol#L7 contract Initializable { - bytes32 private constant _INTIALIZED_EVENT_SIGNATURE = + bytes32 private constant _INITIALIZED_EVENT_SIGNATURE = 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2; bytes32 private constant _INITIALIZABLE_SLOT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132; @@ -68,7 +68,7 @@ contract Initializable { sstore(s, 2) // Emit the {Initialized} event. mstore(0x20, 1) - log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE) + log1(0x20, 0x20, _INITIALIZED_EVENT_SIGNATURE) } } }