SHA256
1
0
forked from pool/cppcheck

16 Commits

Author SHA256 Message Date
8b2ea34550 Accepting request 1296714 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1296714
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cppcheck?expand=0&rev=53
2025-07-31 15:47:04 +00:00
c774de81ce - testcondition.patch: fix expected output in TestCondition::alwaysTrue
and TestCondition::alwaysTrueContainer

OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=154
2025-07-31 07:40:54 +00:00
1510136346 Accepting request 1296293 from devel:tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1296293
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cppcheck?expand=0&rev=52
2025-07-30 09:45:08 +00:00
39065c0c88 - update to 2.18.0:
* Updated path matching syntax for -i, --file-filter,
    suppressions, GUI excludes, and project file excludes.
  * Old patterns that use a `*` may need to use `**` instead if
    it is intended to match path separators. More details can be
    seen in the manual.
  * Support for building with Qt 5 will be removed in Cppcheck
    2.19.
  * The platform 'unix32-unsigned' has been deprecated and will
    be removed in Cppcheck 2.19. Please use '--platform=unix32
    --funsigned-char' instead.
  * The platform 'unix64-unsigned' has been deprecated and will
    be removed in Cppcheck 2.19. Please use '--platform=unix64
    --funsigned-char' instead.
  * Updated Qt to 6.9.1 (official Windows release only).
  * added CMake target `run-clang-tidy-csa` to run Clang Static
    Analyzer
  * added CMake option `ENABLE_CSA_ALPHA` to enable the Clang
    Static Analyzer alpha checkers
  * Updated TinyXML-2 to v11.0.0
  * The minimum supported Python version has been bumped to 3.7.
  * CMake will now unconditionally use Boost.Containers if
    available. If CMake option `USE_BOOST` is specified it will
    now bail out when it is not found.
  * Fix checking a project that contains several project file
    entries for the same file.
  * Fixed --file-filter matching of looked up files in provided
    paths.
  * Split up cstyleCast checker; dangerous casts produce
    portability/warning reports, safe casts produce style

OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=152
2025-07-22 09:50:50 +00:00
562633c396 Accepting request 1286981 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1286981
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cppcheck?expand=0&rev=51
2025-06-20 14:49:53 +00:00
b3f896559d fix Leap 16 build
OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=150
2025-06-19 13:18:38 +00:00
22b2d8599a Accepting request 1266394 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1266394
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cppcheck?expand=0&rev=50
2025-04-02 15:17:29 +00:00
5204f11d18 - build without rules support on Tumbleweed to remove pcre
dependency


See https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/BK3SPPFOM3LI6K5PTXPKZMKMIUIPOEXS/

OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=148
2025-04-02 07:38:15 +00:00
6482888dd1 Accepting request 1248614 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1248614
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cppcheck?expand=0&rev=49
2025-02-26 16:24:10 +00:00
Martin Pluskal
7c85084760 - update to 2.17.1:
* New checks:
    - staticFunction: detect functions that should have internal
      linkage since they are not used outside of their translation
      unit (C code only).
    - Check null pointer return from memory/resource allocation
      functions (nullPointerOutOfMemory,
      nullPointerArithmeticOutOfMemory, nullPointerOutOfResources,
      ctunullpointerOutOfMemory,
      ctunullpointerOutOfResources).
  * Changed interface:
    - Added `reduced` check level. It can be activated with
      `--check-level=reduced`. You get faster analysis
      but some fewer results. The motivation is to be able to make
      analysis time "acceptable" for direct usage.
    - Added `--report-type` option. Enables printing of guidelines
      and classifications for several coding
      standards in place of the regular error identifiers and
      severities.
  * Other:
    - Removed deperecated support for builds via qmake.
    - Using a handwritten rule texts file for MISRA C addon
      violates license and copyright terms. See the
      manual for instructions how to download a official rule
      texts file from MISRA.
- switch to qt6

OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=146
2025-02-26 09:45:42 +00:00
63b03c8ad8 Accepting request 1233575 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1233575
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cppcheck?expand=0&rev=48
2024-12-30 13:25:24 +00:00
e748924daa - update to 2.16.2
* Fix syntax error for function pointer array with @

OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=144
2024-12-27 16:17:47 +00:00
6b6170bd04 Accepting request 1227644 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1227644
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cppcheck?expand=0&rev=47
2024-12-02 15:59:08 +00:00
b2927a1e52 - update to 2.16.1
* SymbolDatabase: does not select l-value method properly

OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=142
2024-12-02 03:30:31 +00:00
be93476822 Accepting request 1219339 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1219339
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cppcheck?expand=0&rev=46
2024-10-30 16:38:09 +00:00
Martin Pluskal
9be70c6eb6 - update to 2.16.0
Improved checking:
  * constVariable; checking multidimensional arrays
  * constVariablePointer; nested array access
  * deallocuse
  Changed interface:
  * SARIF output. Use --output-format=sarif to activate this.
  * Add option --output-format=. Allowed formats are sarif and
    xml.
  Deprecations:
  * The previously deprecated support for Python 2.7 has been
    removed. Please use Python 3 instead.
  * The maximum value for --max-ctu-depth is currently capped
    at 10. This limitation will be removed in a future release.
  Other:
  * "missingInclude" is no longer implicitly enabled with
    "information" - you need to enable it explicitly now.
  * Fixed checkers report when --addon=misra.py or
    --addon=misra.json is used.

OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=140
2024-10-30 08:13:25 +00:00
5 changed files with 168 additions and 14 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:98bcc40ac8062635b492fb096d7815376a176ae26749d6c708083f4637f7c0bb
size 3820560

3
cppcheck-2.18.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dc74e300ac59f2ef9f9c05c21d48ae4c8dd1ce17f08914dd30c738ff482e748f
size 3928107

View File

@@ -1,3 +1,122 @@
-------------------------------------------------------------------
Wed Jul 30 14:05:12 UTC 2025 - Andreas Schwab <schwab@suse.de>
- testcondition.patch: fix expected output in TestCondition::alwaysTrue
and TestCondition::alwaysTrueContainer
-------------------------------------------------------------------
Tue Jul 22 09:50:25 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 2.18.0:
* Updated path matching syntax for -i, --file-filter,
suppressions, GUI excludes, and project file excludes.
* Old patterns that use a `*` may need to use `**` instead if
it is intended to match path separators. More details can be
seen in the manual.
* Support for building with Qt 5 will be removed in Cppcheck
2.19.
* The platform 'unix32-unsigned' has been deprecated and will
be removed in Cppcheck 2.19. Please use '--platform=unix32
--funsigned-char' instead.
* The platform 'unix64-unsigned' has been deprecated and will
be removed in Cppcheck 2.19. Please use '--platform=unix64
--funsigned-char' instead.
* Updated Qt to 6.9.1 (official Windows release only).
* added CMake target `run-clang-tidy-csa` to run Clang Static
Analyzer
* added CMake option `ENABLE_CSA_ALPHA` to enable the Clang
Static Analyzer alpha checkers
* Updated TinyXML-2 to v11.0.0
* The minimum supported Python version has been bumped to 3.7.
* CMake will now unconditionally use Boost.Containers if
available. If CMake option `USE_BOOST` is specified it will
now bail out when it is not found.
* Fix checking a project that contains several project file
entries for the same file.
* Fixed --file-filter matching of looked up files in provided
paths.
* Split up cstyleCast checker; dangerous casts produce
portability/warning reports, safe casts produce style
reports.
* Removed deprecated '--showtime=' value 'top5'. Please use
'top5_file' or 'top5_summary' instead.
-------------------------------------------------------------------
Thu Jun 19 12:22:56 UTC 2025 - Max Lin <mlin@suse.com>
- Do not build with rules support on Leap 16 due to pcre deleted
-------------------------------------------------------------------
Tue Apr 1 21:02:32 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
- build without rules support on Tumbleweed to remove pcre
dependency
-------------------------------------------------------------------
Wed Feb 26 09:39:24 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 2.17.1:
* New checks:
- staticFunction: detect functions that should have internal
linkage since they are not used outside of their translation
unit (C code only).
- Check null pointer return from memory/resource allocation
functions (nullPointerOutOfMemory,
nullPointerArithmeticOutOfMemory, nullPointerOutOfResources,
ctunullpointerOutOfMemory,
ctunullpointerOutOfResources).
* Changed interface:
- Added `reduced` check level. It can be activated with
`--check-level=reduced`. You get faster analysis
but some fewer results. The motivation is to be able to make
analysis time "acceptable" for direct usage.
- Added `--report-type` option. Enables printing of guidelines
and classifications for several coding
standards in place of the regular error identifiers and
severities.
* Other:
- Removed deperecated support for builds via qmake.
- Using a handwritten rule texts file for MISRA C addon
violates license and copyright terms. See the
manual for instructions how to download a official rule
texts file from MISRA.
- switch to qt6
-------------------------------------------------------------------
Fri Dec 20 20:45:05 UTC 2024 - Christoph G <foss@grueninger.de>
- update to 2.16.2
* Fix syntax error for function pointer array with @
-------------------------------------------------------------------
Sun Dec 1 21:03:58 UTC 2024 - Christoph G <foss@grueninger.de>
- update to 2.16.1
* SymbolDatabase: does not select l-value method properly
-------------------------------------------------------------------
Tue Oct 29 21:32:46 UTC 2024 - Christoph G <foss@grueninger.de>
- update to 2.16.0
Improved checking:
* constVariable; checking multidimensional arrays
* constVariablePointer; nested array access
* deallocuse
Changed interface:
* SARIF output. Use --output-format=sarif to activate this.
* Add option --output-format=. Allowed formats are sarif and
xml.
Deprecations:
* The previously deprecated support for Python 2.7 has been
removed. Please use Python 3 instead.
* The maximum value for --max-ctu-depth is currently capped
at 10. This limitation will be removed in a future release.
Other:
* "missingInclude" is no longer implicitly enabled with
"information" - you need to enable it explicitly now.
* Fixed checkers report when --addon=misra.py or
--addon=misra.json is used.
-------------------------------------------------------------------
Sun Sep 1 06:13:20 UTC 2024 - Christoph G <foss@grueninger.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package cppcheck
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,30 +16,38 @@
#
%if 0%{?suse_version} >= 1600
%bcond_with rules
%else
%bcond_without rules
%endif
Name: cppcheck
Version: 2.15.0
Version: 2.18.0
Release: 0
Summary: A tool for static C/C++ code analysis
License: GPL-3.0-or-later
URL: https://github.com/danmar/cppcheck
Source: https://github.com/danmar/cppcheck/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: testcondition.patch
BuildRequires: cmake
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libqt5-linguist-devel
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: qt6-linguist-devel
BuildRequires: xsltproc
BuildRequires: z3-devel
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Help)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(Qt6Help)
BuildRequires: pkgconfig(Qt6Network)
BuildRequires: pkgconfig(Qt6PrintSupport)
BuildRequires: pkgconfig(Qt6Test)
BuildRequires: pkgconfig(Qt6Widgets)
%if %{with rules}
BuildRequires: pkgconfig(libpcre)
%endif
ExcludeArch: %ix86 %arm
Requires: python3-Pygments
@@ -82,7 +90,12 @@ doesn't see.
-DFILESDIR="%{_datadir}/%{name}" \
-DBUILD_GUI=ON \
-DBUILD_TESTS=ON \
-DHAVE_RULES=yes \
%if %{with rules}
-DHAVE_RULES=ON \
%else
-DHAVE_RULES=OFF \
%endif
-DUSE_QT6=yes \
-DUSE_Z3=yes
%cmake_build

22
testcondition.patch Normal file
View File

@@ -0,0 +1,22 @@
Index: cppcheck-2.18.0/test/testcondition.cpp
===================================================================
--- cppcheck-2.18.0.orig/test/testcondition.cpp
+++ cppcheck-2.18.0/test/testcondition.cpp
@@ -4583,7 +4583,7 @@ private:
if (std::numeric_limits<char>::is_signed) {
ASSERT_EQUALS("[test.cpp:6:18]: (style) Condition 'o[1]=='\\0'' is always false [knownConditionTrueFalse]\n", errout_str());
} else {
- ASSERT_EQUALS("[test.cpp:4] -> [test.cpp:6]: (style) Condition 'o[1]=='\\0'' is always false [knownConditionTrueFalse]\n", errout_str());
+ ASSERT_EQUALS("[test.cpp:4:25] -> [test.cpp:6:18]: (style) Condition 'o[1]=='\\0'' is always false [knownConditionTrueFalse]\n", errout_str());
}
check("void f(int x) {\n" // #11449
@@ -5323,7 +5323,7 @@ private:
if (std::numeric_limits<char>::is_signed) {
ASSERT_EQUALS("[test.cpp:5:22]: (style) Condition 'buffer.back()=='\\0'' is always false [knownConditionTrueFalse]\n", errout_str());
} else {
- ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:5]: (style) Condition 'buffer.back()=='\\0'' is always false\n", errout_str());
+ ASSERT_EQUALS("[test.cpp:3:22] -> [test.cpp:5:22]: (style) Condition 'buffer.back()=='\\0'' is always false [knownConditionTrueFalse]\n", errout_str());
}
// #9353