Typos found by running "codespell" (#3042)
This commit is contained in:
parent
fc4238829f
commit
0de0a954d2
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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%|&&"));
|
||||||
|
|
Loading…
Reference in New Issue