File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 4242 cppcheck --platform=unix64 --template="{file}:{line}: {severity}: {message}" \
4343 --output-file=cppcheck.txt \
4444 -I include src \
45- --enable=all --inline-suppr \
45+ --enable=all --inline-suppr --check-level=exhaustive \
4646 --suppressions-list=cppcheck-suppressions.txt
4747 content=$(python .github/generate_cppcheck_report.py $(echo $(git diff --name-only -r HEAD^1 HEAD)))
4848 echo "CPPCHECK_REPORT<<EOF" >> $GITHUB_ENV
Original file line number Diff line number Diff line change @@ -121,11 +121,11 @@ namespace Ark
121121
122122 void Repl::registerBuiltins ()
123123 {
124- m_state.loadFunction (" repl:history" , [this ]([[maybe_unused]] std::vector<Value>&, [[maybe_unused]] VM*) {
124+ m_state.loadFunction (" repl:history" , [this ]([[maybe_unused]] const std::vector<Value>&, [[maybe_unused]] VM*) {
125125 return Value (m_code);
126126 });
127127
128- m_state.loadFunction (" repl:save" , [this ](std::vector<Value>& n, [[maybe_unused]] VM*) {
128+ m_state.loadFunction (" repl:save" , [this ](const std::vector<Value>& n, [[maybe_unused]] VM*) {
129129 if (!types::check (n, ValueType::String))
130130 throw types::TypeCheckingError (
131131 " repl:save" ,
@@ -137,7 +137,7 @@ namespace Ark
137137 return Nil;
138138 });
139139
140- m_state.loadFunction (" repl:load" , [this ](std::vector<Value>& n, [[maybe_unused]] VM*) {
140+ m_state.loadFunction (" repl:load" , [this ](const std::vector<Value>& n, [[maybe_unused]] VM*) {
141141 if (!types::check (n, ValueType::String))
142142 throw types::TypeCheckingError (
143143 " repl:load" ,
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ ut::suite<"Debugger"> debugger_suite = [] {
1818 std::stringstream os;
1919 Ark::State state ({ lib_path });
2020
21- // cppcheck-suppress constParameterReference
22- state.loadFunction (" prn" , [&os](std::vector<Ark::Value>& args, Ark::VM* vm) -> Ark::Value {
21+ state.loadFunction (" prn" , [&os](const std::vector<Ark::Value>& args, Ark::VM* vm) -> Ark::Value {
2322 for (const auto & value : args)
2423 fmt::print (os, " {}" , value.toString (*vm));
2524 fmt::println (os, " " );
You can’t perform that action at this time.
0 commit comments