Skip to content

Update to EnergyPlus v24.2.0a #2705

Update to EnergyPlus v24.2.0a

Update to EnergyPlus v24.2.0a #2705

Workflow file for this run

name: cppcheck
on:
push:
branches: [ master ]
pull_request:
branches: [ master, develop ]
jobs:
build:
runs-on: ubuntu-20.04
# That container is too old to work with the actions that are on node20 now...
#container:
# image: nrel/cppcheck:2.3
steps:
- uses: actions/checkout@v4
- name: Install cppcheck
shell: bash
run: |
# I made a PPA on launchpad where I built cppcheck 2.3 for focal
sudo add-apt-repository ppa:jmarrec/ppa
sudo apt update
sudo apt install -y cppcheck
cppcheck --version
- name: Run cppcheck
shell: bash
run: |
# We ignore polypartition and nano since these are third party libraries
cppcheck \
--std=c++20 \
--enable=warning,style,information \
--suppress=toomanyconfigs \
--suppress=noExplicitConstructor \
--suppress=useStlAlgorithm \
--suppress=unmatchedSuppression \
--suppress=unusedPrivateFunction \
--suppress=functionStatic:src/utilities/core/EnumBase.hpp \
--suppress=functionStatic:src/utilities/core/StaticInitializer.hpp \
--suppress=functionStatic:src/utilities/units/QuantityFactory.hpp \
--suppress=functionConst:src/utilities/filetypes/CSVFile.hpp \
--suppress=functionConst:src/utilities/filetypes/RunOptions.hpp \
--suppress=functionConst:src/utilities/filetypes/WorkflowJSON.hpp \
--suppress=functionConst:src/utilities/filetypes/WorkflowStep.hpp \
--suppress=functionConst:src/utilities/filetypes/WorkflowStepResult.hpp \
--suppress=redundantAssignment:src/utilities/sql/SqlFile.hpp \
--suppress=constParameterCallback:src/utilities/idd/benchmark/IddObjectParse_Benchmark.cpp \
--suppress=constParameterCallback:src/utilities/idd/benchmark/LoadIdd_Benchmark.cpp \
--suppress=constParameterCallback:src/utilities/idf/benchmark/IdfObjectParse_Benchmark.cpp \
--suppress=constParameterCallback:src/utilities/idf/benchmark/LoadIdfFile_Benchmark.cpp \
--suppress=constStatement:src/utilities/geometry/Intersection.cpp \
--inline-suppr \
--inconclusive \
--template='[{file}:{line}]:({severity}),[{id}],{message}' \
-j $(nproc) \
--max-configs=1 \
-i src/cli/test \
-i src/airflow/contam \
-i src/polypartition \
-i src/nano \
./src \
3>&1 1>&2 2>&3 | tee cppcheck.txt
- name: Parse and colorize cppcheck
shell: bash
run: python ./ci/colorize_cppcheck_results.py
- name: Upload cppcheck results as artifact
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: OpenStudio-${{ github.sha }}-cppcheck_results.txt
path: cppcheck.txt