Compare commits

..

No commits in common. "cppcheck/simple" and "master" have entirely different histories.

6 changed files with 3 additions and 90 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
joj3_result.json

View File

@ -1,5 +0,0 @@
cmake_minimum_required(VERSION 3.0)
project(MyProject)
add_executable(main src/simple.cpp)

View File

@ -1 +1,3 @@
# cpplint sillycode # JOJ3 examples
Check other branches.

View File

@ -1,67 +0,0 @@
{
"stage": {
"stages": [
{
"name": "cppcheck",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"cppcheck",
"--template={\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}",
"--force",
"--enable=all",
"--quiet",
"."
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"cpuLimit": 10000000000,
"memoryLimit": 419430400,
"procLimit": 50,
"copyInDir": ".",
"copyOut": [
"stdout"
],
"stdin": {
"content": ""
},
"stdout": {
"name": "stdout",
"max": 65536
},
"stderr": {
"name": "stderr",
"max": 65536
}
}
}
},
"parsers": [
{
"name": "cppcheck",
"with": {
"score": 100,
"matches": [
{
"keywords": [
"doubleFree"
],
"score": 5
},
{
"keywords": [
"memleak"
],
"score": 7
}
]
}
}
]
}
]
}
}

View File

@ -1 +0,0 @@
[{"name":"cppcheck","results":[{"score":88,"comment":"### Test results summary\n\n1. `memleak`: 1 occurrence(s), -7 point(s)\n2. `doubleFree`: 1 occurrence(s), -5 point(s)\n"}],"force_quit":false}]

View File

@ -1,15 +0,0 @@
// Memory leak and resource management warnings
void memoryLeaks() {
int *ptr = new int(42);
// Missing delete - memory leak
int const *array = new int[100];
delete ptr; // Wrong deletion type for array
// Double deletion
int *doubleDel = new int(5);
delete doubleDel;
delete doubleDel;
}
int main() { memoryLeaks(); }