File tree Expand file tree Collapse file tree 6 files changed +17
-15
lines changed
04_python_static_analysis
05_cpp_static_analysis/config Expand file tree Collapse file tree 6 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 2
2
"resource_limits" : {
3
3
"RLIMIT_CPU" : 60 ,
4
4
"RLIMIT_NPROC" : 100 ,
5
- "RLIMIT_AS" : " RLIM_INFINITY"
5
+ "RLIMIT_AS" : " RLIM_INFINITY" ,
6
+ "RLIMIT_SIGPENDING" : 100
6
7
},
7
8
8
9
"testcases" : [
13
14
// The first is to execute the student code, the second is to count the number of calls to the
14
15
// "print" function.
15
16
"command" : [ " python *.py" ,
16
- " submitty_count_node -l python2 assign *.py" ,
17
- " submitty_count_node -l python2 mul *.py" ,
18
- " submitty_count_node -l python2 add *.py" ],
17
+ " submitty_count token -l python Equal *.py" ,
18
+ " submitty_count token -l python Asterisk *.py" ,
19
+ " submitty_count token -l python Plus *.py" ],
19
20
"points" : 4 ,
20
21
"validation" : [
21
22
// First, ensure that the student received the correct answer.
Original file line number Diff line number Diff line change 1
1
volume = 5 * 16.5 * 12.5
2
2
area = 2 * 5 * 16.5 + 2 * 5 * 12.5 + 2 * 16.5 * 12.5
3
- print 'volume =' , volume
4
- print 'area =' , area
3
+ print ( 'volume =' , volume )
4
+ print ( 'area =' , area )
Original file line number Diff line number Diff line change 1
1
volume = 5 * 16.5 * 12.5
2
2
area = 10 * 16.5 + 10 * 12.5 + 2 * 16.5 * 12.5
3
- print 'volume =' , volume
4
- print 'area =' , area
3
+ print ( 'volume =' , volume )
4
+ print ( 'area =' , area )
Original file line number Diff line number Diff line change 1
1
volume = 5 * 16.5 * 12.5
2
2
area = 722.5
3
- print 'volume =' , volume
4
- print 'area =' , area
3
+ print ( 'volume =' , volume )
4
+ print ( 'area =' , area )
Original file line number Diff line number Diff line change 3
3
height = 12.5
4
4
volume = length * width * height
5
5
area = 2 * length * width + 2 * length * height + 2 * width * height
6
- print 'volume =' , volume
7
- print 'area =' , area
6
+ print ( 'volume =' , volume )
7
+ print ( 'area =' , area )
Original file line number Diff line number Diff line change 2
2
"resource_limits" : {
3
3
"RLIMIT_CPU" : 60 ,
4
4
"RLIMIT_NPROC" : 100 ,
5
- "RLIMIT_AS" : " RLIM_INFINITY"
5
+ "RLIMIT_AS" : " RLIM_INFINITY" ,
6
+ "RLIMIT_SIGPENDING" : 100
6
7
},
7
8
8
9
// Static analysis can also be performed upon C++ code.
12
13
{
13
14
14
15
"title" : " Check for goto and auto" ,
15
- "command" : [ " submitty_count_token -l c goto *.cpp" ,
16
- " submitty_count_token -l c auto *.cpp" ],
16
+ "command" : [ " submitty_count token -l c Goto *.cpp" ,
17
+ " submitty_count token -l c Auto *.cpp" ],
17
18
"points" : 2 ,
18
19
"validation" : [
19
20
{
You can’t perform that action at this time.
0 commit comments