grade.sh

In order to fully understand all the design of Gradema, it’s worth looking at the history of grade.sh.

Original grade.sh features

Debugging

All of these features have their own ways to debug them.

The sections of grade.sh

Static analysis (type hinting)

Code formatting

Start of “main”: * https://gitlab.com/classroomcode/grade-sh/grade-sh/-/blob/2d4b707e6288f356c69c1d1edcc44014c0e66c72/.admin_files/grade_backend.sh#L646

  • Starts by calling unit tests, stdio tests, arg tests, doctest tests, cfg_tests, files_exist

  • Then jumps into static analysis, format check, variable custom tests

Grading: * https://gitlab.com/classroomcode/grade-sh/grade-sh/-/blob/2d4b707e6288f356c69c1d1edcc44014c0e66c72/.admin_files/grade_backend.sh#L766

  • $grade stores the total grade, which is then divided by the number of tests and floored