Skip to content

Commit 1b5332c

Browse files
committed
Fix spelling mistakes and CI spellcheck job
1 parent 86ab18c commit 1b5332c

File tree

12 files changed

+36
-29
lines changed

12 files changed

+36
-29
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ jobs:
652652
pip install --user codespell
653653
- run:
654654
name: Check spelling
655-
command: ~/.local/bin/codespell -S "*.enc,.git,Dockerfile*" -I ./scripts/codespell_whitelist.txt
655+
command: ~/.local/bin/codespell -S "*.enc,.git,Dockerfile*,LICENSE,codespell_whitelist.txt,codespell_ignored_lines.txt" -I ./scripts/codespell_whitelist.txt -x ./scripts/codespell_ignored_lines.txt
656656
- gitter_notify_failure_unless_pr
657657

658658
chk_docs_examples:

libevmasm/KnownState.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class KnownState
132132
/// @returns true if the knowledge about the state of both objects is (known to be) equal.
133133
bool operator==(KnownState const& _other) const;
134134

135-
/// Retrieves the current equivalence class fo the given stack element (or generates a new
135+
/// Retrieves the current equivalence class for the given stack element (or generates a new
136136
/// one if it does not exist yet).
137137
Id stackElement(int _stackHeight, langutil::SourceLocation const& _location);
138138
/// @returns the stackElement relative to the current stack height.

liblangutil/Scanner.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ Token Scanner::scanMultiLineDocComment()
425425

426426
while (!isSourcePastEndOfInput())
427427
{
428-
//handle newlines in multline comments
428+
// handle newlines in multiline comments
429429
if (atEndOfLine())
430430
{
431431
skipWhitespace();

libsolutil/StringUtils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ inline std::string formatNumberReadable(
206206
}
207207
}
208208

209-
/// Safely converts an usigned integer as string into an unsigned int type.
209+
/// Safely converts an unsigned integer as string into an unsigned int type.
210210
///
211211
/// @return the converted number or nullopt in case of an failure (including if it would not fit).
212212
inline std::optional<unsigned> toUnsignedInt(std::string const& _value)

scripts/codespell_ignored_lines.txt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
A constant BT = BU;
2+
A constant BU = BV;
3+
A constant FN = FO;
4+
A constant FO = FP;
5+
struct BT { BU m; }
6+
struct BU { BV m; }
7+
struct FN { FO m; }
8+
struct FO { FP m; }
9+
// encode_inline_asm(bytes): 0x20, 2, "fo" -> 0x20, 4, "Zm8="
10+
// encode_no_asm(bytes): 0x20, 2, "fo" -> 0x20, 4, "Zm8="
11+
BOOST_TEST(mutation(chromosome) == Chromosome("fo"));
12+
docker run --rm -v "${OUTPUTDIR}":/tmp/output -v "${SCRIPTDIR}":/tmp/scripts:ro -it trzeci/emscripten:sdk-tag-1.39.3-64bit /tmp/scripts/docker-scripts/rebuild_tags.sh "${TAGS}" /tmp/output "$@"
13+
<assignEnd>
14+
<assignEnd>
15+
<assignEnd>
16+
templ("assignEnd", dynamic ? "end := pos" : "");
17+
templ("assignEnd", dynamic ? "end := pos" : "");
18+
templ("assignEnd", "end := pos");
19+
templ("assignEnd", "end := tail");
20+
templ("assignEnd", "");

scripts/codespell_whitelist.txt

-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
iff
21
nd
3-
assignend
4-
uint
5-
mut
6-
BA
7-
FO
8-
ba
9-
fo
102
compilability
11-
errorstring
12-
hist
13-
otion
143
keypair
15-
ether
16-
sur

test/externalTests/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The above is the workflow to use when the update is straightforward and looks sa
7979
fine to just modify the branches directly. If this is not the case, it is recommended to first perform the
8080
operation on copies of these version-specific branches and test them by creating PRs on `develop` and
8181
`breaking` to see if tests pass. The PRs should just modify project scripts in `test/externalScripts/`
82-
to use the updated copies of the branches and can be discarded aferwards without being merged.
82+
to use the updated copies of the branches and can be discarded afterwards without being merged.
8383

8484
#### Changes needed after a breaking release of the compiler
8585
When a non-backwards-compatible version becomes the most recent release, `breaking` branch

test/libevmasm/Optimiser.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,10 @@ BOOST_AUTO_TEST_CASE(cse_keccak256_twice_same_content_noninterfering_store_in_be
714714
Instruction::MSTORE, // m[12] = DUP1
715715
Instruction::DUP12,
716716
u256(12 + 32),
717-
Instruction::MSTORE, // does not destoy memory knowledge
717+
Instruction::MSTORE, // does not destroy memory knowledge
718718
Instruction::DUP13,
719719
u256(128 - 32),
720-
Instruction::MSTORE, // does not destoy memory knowledge
720+
Instruction::MSTORE, // does not destroy memory knowledge
721721
u256(0x20),
722722
u256(12),
723723
Instruction::KECCAK256 // keccak256(m[12..(12+32)])

test/liblangutil/Scanner.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ BOOST_AUTO_TEST_CASE(trailing_dot_in_numbers)
329329

330330
BOOST_AUTO_TEST_CASE(leading_underscore_decimal_is_identifier)
331331
{
332-
// Actual error is cought by SyntaxChecker.
332+
// Actual error is caught by SyntaxChecker.
333333
CharStream stream("_1.2", "");
334334
Scanner scanner(stream);
335335
BOOST_CHECK_EQUAL(scanner.currentToken(), Token::Identifier);
@@ -339,7 +339,7 @@ BOOST_AUTO_TEST_CASE(leading_underscore_decimal_is_identifier)
339339

340340
BOOST_AUTO_TEST_CASE(leading_underscore_decimal_after_dot_illegal)
341341
{
342-
// Actual error is cought by SyntaxChecker.
342+
// Actual error is caught by SyntaxChecker.
343343
TestScanner scanner("1._2");
344344
BOOST_CHECK_EQUAL(scanner.currentToken(), Token::Number);
345345
BOOST_CHECK_EQUAL(scanner.next(), Token::EOS);
@@ -351,7 +351,7 @@ BOOST_AUTO_TEST_CASE(leading_underscore_decimal_after_dot_illegal)
351351

352352
BOOST_AUTO_TEST_CASE(leading_underscore_exp_are_identifier)
353353
{
354-
// Actual error is cought by SyntaxChecker.
354+
// Actual error is caught by SyntaxChecker.
355355
CharStream stream("_1e2", "");
356356
Scanner scanner(stream);
357357
BOOST_CHECK_EQUAL(scanner.currentToken(), Token::Identifier);
@@ -360,7 +360,7 @@ BOOST_AUTO_TEST_CASE(leading_underscore_exp_are_identifier)
360360

361361
BOOST_AUTO_TEST_CASE(leading_underscore_exp_after_e_illegal)
362362
{
363-
// Actual error is cought by SyntaxChecker.
363+
// Actual error is caught by SyntaxChecker.
364364
CharStream stream("1e_2", "");
365365
Scanner scanner(stream);
366366
BOOST_CHECK_EQUAL(scanner.currentToken(), Token::Number);
@@ -379,7 +379,7 @@ BOOST_AUTO_TEST_CASE(leading_underscore_hex_illegal)
379379

380380
BOOST_AUTO_TEST_CASE(fixed_number_invalid_underscore_front)
381381
{
382-
// Actual error is cought by SyntaxChecker.
382+
// Actual error is caught by SyntaxChecker.
383383
CharStream stream("12._1234_1234", "");
384384
Scanner scanner(stream);
385385
BOOST_CHECK_EQUAL(scanner.currentToken(), Token::Number);
@@ -388,7 +388,7 @@ BOOST_AUTO_TEST_CASE(fixed_number_invalid_underscore_front)
388388

389389
BOOST_AUTO_TEST_CASE(number_literals_with_trailing_underscore_at_eos)
390390
{
391-
// Actual error is cought by SyntaxChecker.
391+
// Actual error is caught by SyntaxChecker.
392392
TestScanner scanner("0x123_");
393393
BOOST_CHECK_EQUAL(scanner.currentToken(), Token::Number);
394394
BOOST_CHECK_EQUAL(scanner.next(), Token::EOS);

test/libsolidity/SolidityExpressionCompiler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ bytes compileFirstExpression(
168168
));
169169

170170
context.appendMissingLowLevelFunctions();
171-
// NOTE: We intentionally disable optimisations for utility functions to simplfy the tests
171+
// NOTE: We intentionally disable optimisations for utility functions to simplify the tests
172172
context.appendYulUtilityFunctions({});
173173
BOOST_REQUIRE(context.appendYulUtilityFunctionsRan());
174174

test/libsolidity/semanticTests/externalContracts/_prbmath/PRBMathCommon.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pragma solidity >=0.8.0;
33

44
/// @dev Common mathematical functions used in both PRBMathSD59x18 and PRBMathUD60x18. Note that this shared library
55
/// does not always assume the signed 59.18-decimal fixed-point or the unsigned 60.18-decimal fixed-point
6-
// representation. When it does not, it is annonated in the function's NatSpec documentation.
6+
// representation. When it does not, it is annotated in the function's NatSpec documentation.
77
library PRBMathCommon {
88
/// @dev How many trailing decimals can be represented.
99
uint256 internal constant SCALE = 1e18;

test/libsolidity/semanticTests/externalContracts/_prbmath/PRBMathUD60x18.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ library PRBMathUD60x18 {
2828
/// @notice Calculates arithmetic average of x and y, rounding down.
2929
/// @param x The first operand as an unsigned 60.18-decimal fixed-point number.
3030
/// @param y The second operand as an unsigned 60.18-decimal fixed-point number.
31-
/// @return result The arithmetic average as an usigned 60.18-decimal fixed-point number.
31+
/// @return result The arithmetic average as an unsigned 60.18-decimal fixed-point number.
3232
function avg(uint256 x, uint256 y) internal pure returns (uint256 result) {
3333
// The operations can never overflow.
3434
unchecked {

0 commit comments

Comments
 (0)