Skip to content

Commit

Permalink
change NOLINT->cppcheck-suppress
Browse files Browse the repository at this point in the history
Signed-off-by: ISP akm <[email protected]>
  • Loading branch information
xygyo77 committed Jun 19, 2024
1 parent 6bf5be1 commit 072e3dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
files=$(cat changed_files.txt | grep -E '\.(cpp|hpp)$' || true)
if [ -n "$files" ]; then
echo "Running Cppcheck on changed files: $files"
cppcheck --enable=all --inconclusive --check-level=exhaustive --error-exitcode=1 --suppressions-list=.cppcheck_suppressions $files 2> cppcheck-report.txt
cppcheck --inline-suppr --enable=all --inconclusive --check-level=exhaustive --error-exitcode=1 --suppressions-list=.cppcheck_suppressions $files 2> cppcheck-report.txt

Check warning on line 51 in .github/workflows/cppcheck-differential.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (suppr)
else
echo "No C++ files changed."
touch cppcheck-report.txt
Expand Down
16 changes: 8 additions & 8 deletions CARET_analyze_cpp_impl/src/iterator_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
Record & IteratorBase::get_record() const
{
throw std::exception();
// NOLINTBEGIN(cppcheck-suppress[unreachableCode])
// cppcheck-suppress-begin unreachableCode
static Record record;
return record;
// NOLINTEND(cppcheck-suppress[unreachableCode])
// cppcheck-suppress-end unreachableCode
}

void IteratorBase::next()
Expand All @@ -48,18 +48,18 @@ void IteratorBase::next()
bool IteratorBase::has_next() const
{
throw std::exception();
// NOLINTBEGIN(cppcheck-suppress[unreachableCode])
// cppcheck-suppress-begin unreachableCode
return false;
// NOLINTEND(cppcheck-suppress[unreachableCode])
// cppcheck-suppress-end unreachableCode
}

const Record & ConstIteratorBase::get_record() const
{
throw std::exception();
// NOLINTBEGIN(cppcheck-suppress[unreachableCode])
// cppcheck-suppress-begin unreachableCode
static Record record;
return record;
// NOLINTEND(cppcheck-suppress[unreachableCode])
// cppcheck-suppress-end unreachableCode
}

void ConstIteratorBase::next()
Expand All @@ -70,7 +70,7 @@ void ConstIteratorBase::next()
bool ConstIteratorBase::has_next() const
{
throw std::exception();
// NOLINTBEGIN(cppcheck-suppress[unreachableCode])
// cppcheck-suppress-begin unreachableCode
return false;
// NOLINTEND(cppcheck-suppress[unreachableCode])
// cppcheck-suppress-end unreachableCode
}

0 comments on commit 072e3dc

Please sign in to comment.