diff --git a/ACTIVE_TAG_FILES.txt b/ACTIVE_TAG_FILES.txt deleted file mode 100644 index e69de29..0000000 diff --git a/materials/instructions_for_testing.md b/materials/instructions_for_testing.md index d820ab6..13db5a3 100644 --- a/materials/instructions_for_testing.md +++ b/materials/instructions_for_testing.md @@ -1,7 +1,9 @@ # Instructions for running tests -In addition to testing for correct output data, the autotest system will check your program and its source code for the -following points: +In addition to testing for correct output, the automated testing system will +check your program and its source code. To successfully pass the test, you must +make sure that your program meets the requirements below. To do this, +run the commands below locally and make sure that they do not output any errors. * **Style tests.** To check how much the beauty of your code meets the standards, for example, you can test your code using the _clang-format_ utility. The ```materials/linters``` folder contains the ```.clang-format``` file, which @@ -23,6 +25,22 @@ following points: Google Style: https://google.github.io/styleguide/cppguide.html + * **Static code analysis.** Sometimes (or not quite sometimes) it happens that + a correctly compiled C program runs completely incorrectly or terminates + with an error trying to access the wrong memory area. To prevent this from happening + errors at the stage of writing the program, use special utilities that analyze + check your source code for potential errors. Our autotest system uses + ```cppcheck``` for this. + + You can test your source code: \ + ```cppcheck --enable=all --std=c11 --check-level=exhaustive --disable=information --suppress=missingIncludeSystem --suppress=missingInclude --suppress=checkersReport src/soursefile_name.c``` + You can also check all the source code files in the directory at once: + ```cppcheck --enable=all --std=c11 --check-level=exhaustive --disable=information --suppress=missingIncludeSystem --suppress=missingInclude --suppress=checkersReport src``` + + Required version of cppcheck: \ + **Mac** 2.13 \ + **Linux** 2.13 + * **Test for correct operation with memory.** When writing C programs, it is very important to watch for memory leaks. To do this the _valgrind_ utility is quite often used in Unix-like operating systems. However, OS X has some troubles diff --git a/materials/instructions_for_testing_rus.md b/materials/instructions_for_testing_rus.md index e84e009..a015939 100644 --- a/materials/instructions_for_testing_rus.md +++ b/materials/instructions_for_testing_rus.md @@ -19,6 +19,22 @@ Google Style: https://google.github.io/styleguide/cppguide.html +* **Статический анализ кода.** Иногда (или не совсем иногда) встречается такое, что +корректно компилирующаяся C-программа работает совершенно неправильно или завершается + с ошибкой попытки доступа не к своей области памяти. Чтобы предотвратить подобные + ошибки на этапе написания программы, используют специальные утилиты, которые анализируют + ваш исходный код на предмет потенциальных ошибок. Наша система автотестов использует + для этого ```cppcheck```. + + Вы можете протестировать ваш исходный код: \ + ```cppcheck --enable=all --std=c11 --check-level=exhaustive --disable=information --suppress=missingIncludeSystem --suppress=missingInclude --suppress=checkersReport src/soursefile_name.c``` + Также можно проверить сразу все файлы с исходным кодом в директории: \ + ```cppcheck --enable=all --std=c11 --check-level=exhaustive --disable=information --suppress=missingIncludeSystem --suppress=missingInclude --suppress=checkersReport src``` + + Необходимая версия cppcheck: \ + **Mac** 2.13 \ + **Linux** 2.13 + * **Тест на корректную работу с памятью.** При написании C-программ очень важно следить за утечками памяти. Для этого в Unix-подобных операционных системах довольно часто используют утилиту _valgrind_. Однако на OS X имеются проблемы с поддержкой _valgrind_, поэтому вместо нее можно использовать утилиту _leaks_. Вдаваться в механизм работы этих утилит мы сейчас не будем — если интересно, можешь почитать в гугле.