Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/CI-unixish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:

strategy:
matrix:
image: ["ubuntu:24.04", "ubuntu:25.10", "alpine:3.23"]
image: ["ubuntu:24.04", "ubuntu:25.10", "alpine:3.23", "oraclelinux:8"]
fail-fast: false # Prefer quick result

runs-on: ubuntu-22.04
Expand All @@ -111,6 +111,12 @@ jobs:
run: |
apk add make g++ pcre-dev bash python3 libxml2-utils

- name: Install missing software on Oracle Linux
if: contains(matrix.image, 'oraclelinux')
run: |
yum install -y git python3 which epel-release
yum install -y cmake3 gcc-c++ make pcre-devel

# needs to be called after the package installation since
# - it doesn't call "apt-get update"
- name: ccache
Expand All @@ -121,15 +127,29 @@ jobs:
# /usr/lib/ccache/bin - Alpine Linux

- name: Build cppcheck
if: "!contains(matrix.image, 'oraclelinux')"
run: |
export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror"

- name: Build cppcheck (Oracle Linux)
if: contains(matrix.image, 'oraclelinux')
run: |
export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror" CPPFLAGS="-DGCC_BUG_HACK_NOEXCEPT"

- name: Build test
if: "!contains(matrix.image, 'oraclelinux')"
run: |
export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror" testrunner

- name: Build test (Oracle Linux)
if: contains(matrix.image, 'oraclelinux')
run: |
export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror" CPPFLAGS="-DGCC_BUG_HACK_NOEXCEPT" testrunner

- name: Run test
run: |
make -j$(nproc) HAVE_RULES=yes test
Expand Down
4 changes: 2 additions & 2 deletions lib/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Settings::~Settings() = default;
Settings::Settings(const Settings&) = default;
Settings & Settings::operator=(const Settings &) = default;

Settings::Settings(Settings&&) noexcept = default;
Settings & Settings::operator=(Settings &&) noexcept = default;
Settings::Settings(Settings&&) NOEXCEPT = default;
Settings & Settings::operator=(Settings &&) NOEXCEPT = default;

std::string Settings::loadCppcheckCfg(Settings& settings, Suppressions& suppressions, bool debug)
{
Expand Down
11 changes: 9 additions & 2 deletions lib/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@
};


#ifdef GCC_BUG_HACK_NOEXCEPT
#define NOEXCEPT
#else
#define NOEXCEPT noexcept
#endif


/**
* @brief This is just a container for general settings so that we don't need
* to pass individual values to functions or constructors now or in the
Expand All @@ -113,8 +120,8 @@
Settings(const Settings&);
Settings& operator=(const Settings&);

Settings(Settings&&) noexcept;
Settings& operator=(Settings&&) noexcept;
Settings(Settings&&) NOEXCEPT;
Settings& operator=(Settings&&) NOEXCEPT;

Check warning

Code scanning / Cppcheck Premium

User-provided copy and move member functions of a class should have appropriate signatures. Assignment operator must have lvalue ref-qualifier must not be virtual and have only one argument which must be non-volatile Warning

User-provided copy and move member functions of a class should have appropriate signatures. Assignment operator must have lvalue ref-qualifier must not be virtual and have only one argument which must be non-volatile

static std::string loadCppcheckCfg(Settings& settings, Suppressions& suppressions, bool debug = false);

Expand Down
Loading