From 0de0a954d27847664dc77ed177af320f35862f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 12 Jan 2021 20:48:25 +0100 Subject: [PATCH] Typos found by running "codespell" (#3042) --- addons/misra.py | 2 +- lib/valueflow.cpp | 2 +- test/testtoken.cpp | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/misra.py b/addons/misra.py index e765d8516..5894e1306 100755 --- a/addons/misra.py +++ b/addons/misra.py @@ -1325,7 +1325,7 @@ class MisraChecker: 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: if not token.valueType: continue diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 767d5e0a4..1b4e22790 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -4091,7 +4091,7 @@ struct ConditionHandler { if (cond.vartok->exprId() == 0) return; - // If condition is known then dont propogate value + // If condition is known then don't propagate value if (tok->hasKnownIntValue()) return; diff --git a/test/testtoken.cpp b/test/testtoken.cpp index 44ef459ca..26a2740cd 100644 --- a/test/testtoken.cpp +++ b/test/testtoken.cpp @@ -120,13 +120,13 @@ private: Token *last = token->tokAt(2); ASSERT_EQUALS(token->str(), "1"); 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_MSG(true, last->next() == nullptr, "Null was expected"); ASSERT_EQUALS(last->str(), "3"); 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_MSG(true, token->previous() == nullptr, "Null was expected"); @@ -721,24 +721,24 @@ private: void matchOr() const { 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(), "; %op%")); - // cppcheck-suppress simplePatternError - this is itentional + // cppcheck-suppress simplePatternError - this is intentional ASSERT_EQUALS(false, Token::Match(bitwiseOr.tokens(), "; %oror%")); givenACodeSampleToTokenize bitwiseOrAssignment(";|=;"); - // cppcheck-suppress simplePatternError - this is itentional + // cppcheck-suppress simplePatternError - this is intentional ASSERT_EQUALS(false, Token::Match(bitwiseOrAssignment.tokens(), "; %or%")); 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%")); 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(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%|&&"));