Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
cppcheck: Update guide, wrapper and suppression list
Browse files Browse the repository at this point in the history
This patch updates document/script to cppcheck V2.8 and bypass error ids with
unknown macro before switching to V2.8 which is also compatible with V1.90.

Signed-off-by: Wei-Chia Su <[email protected]>
  • Loading branch information
Wei-Chia Su authored and leandro-arm committed Jun 24, 2024
1 parent c09e651 commit cd5ef3f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG ARM_NONE_EABI_VERSION="10.3-2021.10"
ARG AARCH64_NONE_ELF_VERSION="9.2-2019.12"
ARG CMAKE_VERSION="3.25.2"
ARG LLVM_VERSION="13"
ARG CPPCHECK_VERSION="1.90"
ARG CPPCHECK_VERSION="2.8"
ARG DOXYGEN_VERSION="1.8.13"

ENV DEBIAN_FRONTEND=noninteractive
Expand Down
9 changes: 9 additions & 0 deletions tools/cppcheck_suppress_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,12 @@ syntaxError:*product/morello/module/dmc_bing/include/mod_dmc_bing.h:789

// Suppress CMSIS errors
*:*/CMSIS*/*

// Cppcheck seems to get confused with macro substitution
unknownMacro:*product/rcar/module/rcar_system/src/rcar_common.c:22
unknownMacro:*product/rcar/module/rcar_system/src/rcar_iic_dvfs.c:173
unknownMacro:*product/rcar/module/rcar_system/src/rcar_pwc.c:162
unknownMacro:*product/morello/module/morello_system/src/mod_morello_system.c:302
unknownEvaluationOrder:*framework/src/fwk_io.c:60
unknownEvaluationOrder:*framework/src/fwk_io.c:61
unknownEvaluationOrder:*framework/src/fwk_io.c:63
4 changes: 2 additions & 2 deletions tools/cppcheck_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#
# Arm SCP/MCP Software
# Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
# Copyright (c) 2021-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
Expand Down Expand Up @@ -35,7 +35,7 @@
import re

# Holds required version info.
required_tool_version = "1.90"
required_tool_version = "2.8"

tool_name = "CPPCHECK"

Expand Down
2 changes: 1 addition & 1 deletion user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ order to run the tests suites
- [ARM GCC GNU-A toolchain] (*7.4.0* or later): Required to build framework
tests that run on the host system
- [lcov] (*1.13* or later): Required to run unit test framework
- [cppcheck] (*1.90*): Required during build process to check the code
- [cppcheck] (*2.8*): Required during build process to check the code
- [ninja-build] (*1.10.0* or later): Default build system to compile the project
UNIX-Make is a suitable alternative if preferred.
- [clang-format] (*10.0.0* or later): Automatic code formatter.
Expand Down

0 comments on commit cd5ef3f

Please sign in to comment.