Skip to content

Commit

Permalink
Merge pull request #2751 from guwirth/align-v2.1.3
Browse files Browse the repository at this point in the history
merge cxx v2.1.3 into cxx 2.2.0 branch
  • Loading branch information
guwirth authored Sep 26, 2024
2 parents f814052 + 9dc34f9 commit e773504
Show file tree
Hide file tree
Showing 455 changed files with 1,911 additions and 921 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<pre>
/*
* SonarQube, open source software quality management tool.
* Copyright (C) 2008-2013 SonarSource
* Copyright (C) 2010-2024 SonarSource
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* SonarQube is free software; you can redistribute it and/or
Expand Down
14 changes: 14 additions & 0 deletions cxx-sensors/src/main/resources/cppcheck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8111,6 +8111,20 @@ Pointer arithmetic overflow.
<remediationFunction>CONSTANT_ISSUE</remediationFunction>
<remediationFunctionBaseEffort>5min</remediationFunctionBaseEffort>
</rule>
<!-- ########### New in Cppcheck 2.15.0 ########### -->
<rule>
<key>suspiciousFloatingPointCast</key>
<name>Floating-point cast causes loss of precision</name>
<description><![CDATA[
<p>
If this cast is not intentional, remove it to avoid loss of precision
</p>
<h2>References</h2>
<p><a href="https://cwe.mitre.org/data/definitions/398.html" target="_blank">CWE-398</a></p>
]]></description>
<tag>cwe</tag>
<severity>MINOR</severity>
</rule>
<!-- ########### Internal Cppcheck errors (not in errorlist) ########### -->
<rule>
<key>internalAstError</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void createRulesTest() {
def.define(context);

RulesDefinition.Repository repo = context.repository(CxxCppCheckRuleRepository.KEY);
assertThat(repo.rules()).hasSize(685);
assertThat(repo.rules()).hasSize(686);
}

}
2 changes: 1 addition & 1 deletion cxx-sensors/src/tools/clangsa_createrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# -*- coding: utf-8 -*-
# SonarQube C++ Community Plugin (cxx plugin)
# Copyright (C) 2010-2022 SonarOpenCommunity
# Copyright (C) 2010-2024 SonarOpenCommunity
# http://github.com/SonarOpenCommunity/sonar-cxx
#
# This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion cxx-sensors/src/tools/clangtidy_createrules.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# SonarQube C++ Community Plugin (cxx plugin)
# Copyright (C) 2010-2022 SonarOpenCommunity
# Copyright (C) 2010-2024 SonarOpenCommunity
# http://github.com/SonarOpenCommunity/sonar-cxx
#
# This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion cxx-sensors/src/tools/cppcheck_createrules.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# C++ Community Plugin (cxx plugin)
# Copyright (C) 2010-2022 SonarOpenCommunity
# Copyright (C) 2010-2024 SonarOpenCommunity
# http://github.com/SonarOpenCommunity/sonar-cxx
#
# This program is free software; you can redistribute it and/or
Expand Down
8 changes: 7 additions & 1 deletion cxx-sensors/src/tools/generate_cppcheck_resources.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ SET SCRIPT_DIR=%~dp0
SET CPPCHECK_DIR=C:\Program Files\Cppcheck\
SET PYTHON_DIR=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\

SET CPPCHECK_LIBRARY_ARGS=--library=avr.cfg --library=bento4.cfg --library=boost.cfg --library=bsd.cfg --library=cairo.cfg --library=cppcheck-lib.cfg --library=cppunit.cfg --library=dpdk.cfg --library=embedded_sql.cfg --library=emscripten.cfg --library=ginac.cfg --library=gnu.cfg --library=googletest.cfg --library=gtk.cfg --library=icu.cfg --library=kde.cfg --library=libcerror.cfg --library=libcurl.cfg --library=libsigc++.cfg --library=lua.cfg --library=mfc.cfg --library=microsoft_atl.cfg --library=microsoft_sal.cfg --library=microsoft_unittest.cfg --library=motif.cfg --library=nspr.cfg --library=ntl.cfg --library=opencv2.cfg --library=opengl.cfg --library=openmp.cfg --library=openssl.cfg --library=pcre.cfg --library=posix.cfg --library=python.cfg --library=qt.cfg --library=ruby.cfg --library=sdl.cfg --library=sfml.cfg --library=sqlite3.cfg --library=std.cfg --library=tinyxml2.cfg --library=vcl.cfg --library=windows.cfg --library=wxsqlite3.cfg --library=wxsvg.cfg --library=wxwidgets.cfg --library=zlib.cfg
setlocal ENABLEDELAYEDEXPANSION

SET CPPCHECK_LIBRARY_ARGS=

for %%i in ("%CPPCHECK_DIR%cfg\*.cfg") do (
SET CPPCHECK_LIBRARY_ARGS=!CPPCHECK_LIBRARY_ARGS! "--library=%%~nxi"
)

rem download cwec_latest.xml.zip and extract it to unzip cwec_vx.y.xml
rem wget https://cwe.mitre.org/data/xml/cwec_latest.xml.zip --output-document=cwec_latest.xml.zip && unzip -j -o cwec_latest.xml.zip
Expand Down
2 changes: 1 addition & 1 deletion cxx-sensors/src/tools/infer_createrules.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# C++ Community Plugin (cxx plugin)
# Copyright (C) 2010-2019 SonarOpenCommunity
# Copyright (C) 2010-2024 SonarOpenCommunity
# http://github.com/SonarOpenCommunity/sonar-cxx
#
# This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion cxx-sensors/src/tools/utils_createrules.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# C++ Community Plugin (cxx plugin)
# Copyright (C) 2010-2022 SonarOpenCommunity
# Copyright (C) 2010-2024 SonarOpenCommunity
# http://github.com/SonarOpenCommunity/sonar-cxx
#
# This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion cxx-sensors/src/tools/vc_createrules.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# C++ Community Plugin (cxx plugin)
# Copyright (C) 2020 SonarOpenCommunity
# Copyright (C) 2020-2024 SonarOpenCommunity
# http://github.com/SonarOpenCommunity/sonar-cxx
#
# This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion cxx-squid-bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ In the original version, some features were discontinued in subsequent versions,
```Java
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion cxx-squid-bridge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<name>Cxx :: Language Recognizer :: Squid Bridge</name>

<properties>
<license.years>2021-2022</license.years>
<license.years>2021-2024</license.years>
<!-- in addition, a dependency must be set in 'integration-tests/pom.xml' to aggregate the results -->
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
</properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* C++ Community Plugin (cxx plugin)
* Copyright (C) 2021-2022 SonarOpenCommunity
* Copyright (C) 2021-2024 SonarOpenCommunity
* http://github.com/SonarOpenCommunity/sonar-cxx
*
* This program is free software; you can redistribute it and/or
Expand Down
Loading

0 comments on commit e773504

Please sign in to comment.