Original title:
Nástroj pro hodnocení úhlednosti zdrojových souborů
Translated title:
The Tool for Assessing the Neatness of Source Code
Authors:
Jahoda, David ; Smrčka, Aleš (referee) ; Veigend, Petr (advisor) Document type: Bachelor's theses
Year:
2021
Language:
cze Publisher:
Vysoké učení technické v Brně. Fakulta informačních technologií Abstract:
[cze][eng]
Tato práce se zabývá tvorbou nástroje, jenž by umožňoval kontrolu a hodnocení úhlednosti zdrojových kódů v jazyce C. Primární cílovou skupinou jsou studenti předmětu Základy programování. Způsob realizace uvažuje využití nástroje Clang-Tidy, rozšířeného o vlastní sadu kontrol a programu vyhodnocující výsledky kontrol na základě vstupní konfigurace. Vytvořený program je schopen bodově hodnotit zdrojové kódy za pomoci 16 kontrol dle konfigurace. Tyto kontroly odhalují různé začátečnické chyby. Z testování studentských projektů vyplynulo, že nejčastější chybou je využívání tzv. magických čísel. Program je možno s vhodným poučením studentů nasadit v předmětu Základy programování (IZP).
This work deals with creation of tool that would allow the checking and evaluation of neatness of source codes in the C language. The primary user group are students of Introduction to Programming Systems (IZP). The implementation considers the use of Clang-Tidy tool (extended with custom set of checks) and program that evaluates results of checks based on the input configuration. The created program is capable of scoring source code using 16 checks according to the configuration. These checks detect various beginners errors. Testing of the student projects revealed that the most common error is the use of so-called magic numbers. The program can be deployed in the Introduction to Programming Systems (IZP) course with appropriate student instruction.
Keywords:
C language; clang-tidy; coding conventions; Neatness; source codes; static analysis; clang-tidy; jazyk C; programovací konvence; statická analýza; zdrojové kódy; Úhlednost
Institution: Brno University of Technology
(web)
Document availability information: Fulltext is available in the Brno University of Technology Digital Library. Original record: http://hdl.handle.net/11012/199385