Typos found by running "codespell" (#3042)

This commit is contained in:
Armin Müller 2021-01-12 20:48:25 +01:00 committed by GitHub
parent fc4238829f
commit 0de0a954d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View File

@ -1325,7 +1325,7 @@ class MisraChecker:
def misra_6_1(self, data): def misra_6_1(self, data):
# Bitfield type must be bool or explicity signed/unsigned int # Bitfield type must be bool or explicitly signed/unsigned int
for token in data.tokenlist: for token in data.tokenlist:
if not token.valueType: if not token.valueType:
continue continue

View File

@ -4091,7 +4091,7 @@ struct ConditionHandler {
if (cond.vartok->exprId() == 0) if (cond.vartok->exprId() == 0)
return; return;
// If condition is known then dont propogate value // If condition is known then don't propagate value
if (tok->hasKnownIntValue()) if (tok->hasKnownIntValue())
return; return;

View File

@ -120,13 +120,13 @@ private:
Token *last = token->tokAt(2); Token *last = token->tokAt(2);
ASSERT_EQUALS(token->str(), "1"); ASSERT_EQUALS(token->str(), "1");
ASSERT_EQUALS(token->next()->str(), "2"); ASSERT_EQUALS(token->next()->str(), "2");
// cppcheck-suppress redundantNextPrevious - this is itentional // cppcheck-suppress redundantNextPrevious - this is intentional
ASSERT_EQUALS(token->tokAt(2)->str(), "3"); ASSERT_EQUALS(token->tokAt(2)->str(), "3");
ASSERT_EQUALS_MSG(true, last->next() == nullptr, "Null was expected"); ASSERT_EQUALS_MSG(true, last->next() == nullptr, "Null was expected");
ASSERT_EQUALS(last->str(), "3"); ASSERT_EQUALS(last->str(), "3");
ASSERT_EQUALS(last->previous()->str(), "2"); ASSERT_EQUALS(last->previous()->str(), "2");
// cppcheck-suppress redundantNextPrevious - this is itentional // cppcheck-suppress redundantNextPrevious - this is intentional
ASSERT_EQUALS(last->tokAt(-2)->str(), "1"); ASSERT_EQUALS(last->tokAt(-2)->str(), "1");
ASSERT_EQUALS_MSG(true, token->previous() == nullptr, "Null was expected"); ASSERT_EQUALS_MSG(true, token->previous() == nullptr, "Null was expected");
@ -721,24 +721,24 @@ private:
void matchOr() const { void matchOr() const {
givenACodeSampleToTokenize bitwiseOr(";|;", true); givenACodeSampleToTokenize bitwiseOr(";|;", true);
// cppcheck-suppress simplePatternError - this is itentional // cppcheck-suppress simplePatternError - this is intentional
ASSERT_EQUALS(true, Token::Match(bitwiseOr.tokens(), "; %or%")); ASSERT_EQUALS(true, Token::Match(bitwiseOr.tokens(), "; %or%"));
ASSERT_EQUALS(true, Token::Match(bitwiseOr.tokens(), "; %op%")); ASSERT_EQUALS(true, Token::Match(bitwiseOr.tokens(), "; %op%"));
// cppcheck-suppress simplePatternError - this is itentional // cppcheck-suppress simplePatternError - this is intentional
ASSERT_EQUALS(false, Token::Match(bitwiseOr.tokens(), "; %oror%")); ASSERT_EQUALS(false, Token::Match(bitwiseOr.tokens(), "; %oror%"));
givenACodeSampleToTokenize bitwiseOrAssignment(";|=;"); givenACodeSampleToTokenize bitwiseOrAssignment(";|=;");
// cppcheck-suppress simplePatternError - this is itentional // cppcheck-suppress simplePatternError - this is intentional
ASSERT_EQUALS(false, Token::Match(bitwiseOrAssignment.tokens(), "; %or%")); ASSERT_EQUALS(false, Token::Match(bitwiseOrAssignment.tokens(), "; %or%"));
ASSERT_EQUALS(true, Token::Match(bitwiseOrAssignment.tokens(), "; %op%")); ASSERT_EQUALS(true, Token::Match(bitwiseOrAssignment.tokens(), "; %op%"));
// cppcheck-suppress simplePatternError - this is itentional // cppcheck-suppress simplePatternError - this is intentional
ASSERT_EQUALS(false, Token::Match(bitwiseOrAssignment.tokens(), "; %oror%")); ASSERT_EQUALS(false, Token::Match(bitwiseOrAssignment.tokens(), "; %oror%"));
givenACodeSampleToTokenize logicalOr(";||;", true); givenACodeSampleToTokenize logicalOr(";||;", true);
// cppcheck-suppress simplePatternError - this is itentional // cppcheck-suppress simplePatternError - this is intentional
ASSERT_EQUALS(false, Token::Match(logicalOr.tokens(), "; %or%")); ASSERT_EQUALS(false, Token::Match(logicalOr.tokens(), "; %or%"));
ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "; %op%")); ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "; %op%"));
// cppcheck-suppress simplePatternError - this is itentional // cppcheck-suppress simplePatternError - this is intentional
ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "; %oror%")); ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "; %oror%"));
ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "; &&|%oror%")); ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "; &&|%oror%"));
ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "; %oror%|&&")); ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "; %oror%|&&"));